How do I list unsynced files on a removable media?

2

  1. How do I list all unsynced/unwritten files on a usb-stick/sd-card or other removable-media?

  2. Can I be certain all files are synced after I run sync?

Don Question

Posted 2015-10-14T15:21:31.353

Reputation: 173

Answers

1

  1. How do I list all unsynced/unwritten files on a usb-stick/sd-card or other removable-media?

Use lsof to list open files then use grep to filter the results to your mountpoint.

  1. Can I be certain all files are synced after I run sync?

If sync returns successfully then at that moment all files are synced. An unmount (or "eject" in the GUI) calls sync in the background before actually unmounting.

Steven

Posted 2015-10-14T15:21:31.353

Reputation: 24 804