| sync(1) | General Commands Manual | sync(1) |
NAME¶
sync - Synchronize cached writes to persistent storage
SYNOPSIS¶
sync [-f|--file-system] [-d|--data] [-h|--help] [-V|--version] [files]
DESCRIPTION¶
Synchronize cached writes to persistent storage
OPTIONS¶
- -f, --file-system
- sync the file systems that contain the files (Linux and Windows only)
- -d, --data
- sync only file data, no unneeded metadata (Linux only)
- -h, --help
- Print help
- -V, --version
- Print version
- [files]
VERSION¶
v(uutils coreutils) 0.7.0
EXAMPLES¶
Flush all pending write operations on all disks:
sync
Flush all pending write operations on a single file to disk:
sync path/to/file
Flush writes and drop file system caches (Linux only):
sync; echo 3 | sudo tee /proc/sys/vm/drop_caches
Flush disk writes and attempts to clear inactive memory and filesystem caches (macOS only):
sync; sudo purge
The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail.
| sync (uutils coreutils) 0.7.0 |