Safely eject USB drives

Data drive write caching can lead to data loss upon unplugging an external flash drive or hard drive. Inexpensive USB flash drives may write data slowly. Operating systems use RAM to cache write data, making the copy/write operation appear done while the final data writing is actually still underway. If the drive is removed before the writing is done, that file or even the whole disk can become corrupted and unreadable.

For example, a drive writing at 10 MByte / second for a 1 GByte file could take 1000 / 10 = 100 seconds, despite the file copy operation appearing done in less than 10 seconds.

On macOS or Linux, verify writing to a flash drive is completed with sync and then click the Eject icon next to the drive’s name in Finder or File Manager.

Monitor macOS or Linux file write progress with iotop.

For Windows, use the Safely Remove Hardware icon in the system tray. Monitor Windows file write progress with Task Manager or Process Explorer.