SYNC(8)

NAME
sync - flush Linux filesystem buffers

SYNOPSIS
sync

DESCRIPTION
sync executes sync(2), which flushes the filesystem buffers to disk. sync should be called before the processor is halted in an unusual manner (i.e., before causing a kernel panic when debugging new kernel code). In general, the processor should be halted using the reboot(8), or halt(8) commands, which will attempt to put the system in a quiescent state before calling sync(2). From Linus: "Note that 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. If you are doing the sync with the expectation of killing the machine soon after, please take this into account and sleep for a few seconds. [The reboot(8) command takes these precautions.]

SEE ALSO
sync(2), update(8), reboot(8), halt(8)