SYNC(2)                         System Calls                         SYNC(2)
NAME
     sync - update super block
SYNOPSIS
     #include <unistd.h>     void     sync(
void);
DESCRIPTION
     The 
sync() function writes all information in memory that should be on
     disk, including modified super blocks, modified inodes, and delayed
     block I/O.
     Unlike 
fsync(3C), which completes the writing before it returns, 
sync()
     schedules but does not necessarily complete the writing before
     returning.  To perform a blocking synchronization of a single file
     system, use the 
syncfs(3C) function.
USAGE
     The 
sync() function should be used by applications that examine a file
     system, such as 
fsck(8), 
df(8), and is mandatory before rebooting.
INTERFACE STABILITY
     CommittedSEE ALSO
     fsync(3C), 
syncfs(3C), 
attributes(7), 
standards(7), 
df(8), 
fsck(8)illumos                         July 2, 2024                         illumos