sync

linux

What is the purpose of the sync utility?

Completes all pending input/output operations (requires root privileges).

Ensure disk accuracy.

Why and how should we avoid syncing after running fsck?

Do not sync when you have run fsck manually on root system. If you sync the disk at this point, you will rewrite the bad superblocks into the kernel buffers and undo fsck. On BSD system, use the -n option to reboot or shutdown to suppress the usual automatic sync.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License