Quote:
Originally Posted by Godzil
For Linux, if you want to be sure that the kernel/fs flush everything, just call sync(1) before anything else. The sync application force the VFS to flush all of it's caches
|
Actually you have to wait some time after sync. From the man page:
Quote:
On Linux, sync is only guaranteed to schedule the dirty blocks for writing; it can actually take a short time before all the blocks are finally written. The reboot(8) and halt(8) commands take this into account by sleeping for a few seconds after calling sync(2).
|
So umount seems to be safer...