SYNC(1) General Commands Manual SYNC(1)

syncSchedule file system updates

sync [-df] [file...]

Schedule cached writes to filesystems. If any file is specified, only those files are scheduled, otherwise all filesystems are synchronized.

Sync only file data, not metadata.
Sync entire filesystem. (Only available on systems with syncfs(2))

The sync utility exits 0 on success, and >0 if an error occurs.

fdatasync(2), fsync(2), sync(2), syncfs(2)

A sync utility appeared in Version 4 AT&T UNIX.

Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>

Due to sync(2) not indicating errors, synchronisation failures can't be detected. So the file(s) to be synchronised should be specified, or if available in your system, the -f option to synchronise a whole filesystem.

2024-07-28 Linux 6.6.67-gentoo-x86_64