Table of Contentssync - flush Linux filesystem buffers sync 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.]
sync(2), update(8), reboot(8), halt(8) Linus Torvalds (torvalds@cs.helsinki.fi)
Table of Contents
www.fiveanddime.net