[-?
@(#)$Id: sync (AT&T Research) 2013-09-22 $
]
[+NAME?sync - schedule file/file system updates]
[+DESCRIPTION?\bsync\b(1) transfers buffered modifications of file metadata and data to the storage device for a specific file, a specific filesystem, or all filesystems.]
[+?At minimum \bsync\b (with no options) should be called before halting the system. Most systems provide graceful shutdown procedures that include \bsync\b -- use them if possible.]
[f:sfsync?Calls \bsfsync\b(3) to flush all buffered \asfio\a stream data.]
[s:fsync?Calls \bfsync\b(2) using the open file descriptor \afd\a to transfer all data associated with \afd\a to the storage device. \bsync\b waits until the transfer completes or an error is detected.]#[fd]
[S:syncfs?Calls \bsyncfs\b(2) using the open file descriptor \afd\a to transfer all data for the file system containing the file referred to by \afd\a. Depending on the native system implementation \bsync\b may return before the data is actually written. Implies \b--sfsync\b.]#[fd]
[X:sync|all?Calls \bsync\b(2) to transfer all data for all filesystems. Depending on the native system implementation the writing, although scheduled, is not necessarily complete upon return from \bsync\b. Since \bsync\b(2) has no failure indication, \bsync\b only fails for option/operand syntax errors, or when \bsync\b(2) does not return, in which case \bsync\b(1) also does not return. Implies \b--sfsync\b. This is the default when no options are specified.]



[+SEE ALSO?\bfsync\b(2), \bsync\b(2), \bsyncfs\b(2), \bsfsync\b(3), \bshutdown\b(8)]
