I regularly have the problem that my Linux (Ubuntu 12.04) writes some files to an USB drive that are afterwards missing or broken in Windows. Windows often also tells me that it found problems with the drive. The drive is FAT32 and yes, I always use the small eject icon in Nautilus or simply shutdown the system before removing the drive.
To workaround the problem, I now use sudo sync to force any pending writes to execute, hoping that this will avoid these problems in the future.
What I am actually looking for is an option that tells my Ubuntu/Linux to perform any pending writes as soon possible and afterwards doing a safety check if the data was really written correctly. Currently the default strategy looks rather like "do not write everything too soon and do not double check".
blockdev --flushbufs… – poige Oct 25 '12 at 23:07