guys i was once told that after i create a new partition, i should also make use of sync.. i found very few info on google. . .cn somebody explain to me wat does SYNC do? ? thanks
Printable View
guys i was once told that after i create a new partition, i should also make use of sync.. i found very few info on google. . .cn somebody explain to me wat does SYNC do? ? thanks
Flushes the buffers so that the disk has a fully up-to-date version of any changes made to it.
so considering i have created the new partition USING CFDISK.. when and where i would type sync? ?
sync just forces the file system buffers to flush. it should be synced automatically every n seconds (depends on FS and configs I'd guess) and on umounting.
So, simle answer, when you need to make sure that all disk writes are commited - eg, before doing something that possibly could crash the kernel (like forcefully unloading kernel modules).
You could specify it in /etc/fstab as an filesystem option. Very handy for floppy drives and usbsticks which can be ejected/pulled of unexpectedly.