sync

Update filesystems to match cached data (UNIX)

Syntax:

sync

Runs on:

QNX Neutrino

Options:

None.

Description:

The sync utility forces the filesystem manager to begin flushing all modified in-memory inodes and all previously unwritten system buffers to disk. This ensures that all file modifications up to that point are scheduled to be saved.

Note: The sync utility usually returns before the operation is complete. After executing sync, you must allow sufficient time for the driver queues to drain before you may assume that the data is safely on disk. This delay depends on the speed of your disk(s), the number of buffers that must be drained, and how active your system is at the time. It is unusual for the operation to take more than four to five seconds with typical IDE drives and a large (2 megabyte) cache, if a large portion of the cache needs to be flushed. With faster disks, it usually completes in under two seconds.

Examples:

Synchronize the local filesystem:

sync