Seth Woolley's Man Viewer

Manual for sync - man 8 sync

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

SYNC(8)                    Linux Programmer's Manual                   SYNC(8)



NAME
       sync(1,2,8) - synchronize data on disk with memory

SYNOPSYS
       sync(1,2,8) [--help] [--version]

DESCRIPTION
       sync(1,2,8)  writes any data buffered in(1,8) memory out to disk.  This can include
       (but is not limited to)  modified  superblocks,  modified  inodes,  and
       delayed  reads and writes.  This must be implemented by the kernel; The
       sync(1,2,8) program does nothing but exercise the sync(1,2,8)(2) system call.

       The kernel keeps data in(1,8) memory to avoid doing (relatively  slow)  disk
       reads  and  writes.   This  improves  performance,  but if(3,n) the computer
       crashes, data may be lost or the  filesystem  corrupted  as  a  result.
       sync(1,2,8) ensures that everything in(1,8) memory is written to disk.

       sync(1,2,8) should be called before the processor is halted in(1,8) an unusual man-
       ner (e.g., before causing a kernel  panic  when  debugging  new  kernel
       code).   In  general,  the  processor  should be halted using the shut-
       down(8) or reboot(8) or halt(8) commands, which will attempt to put the
       system in(1,8) a quiescent state before calling sync(1,2,8)(2).  (Various implemen-
       tations of these commands exist; consult your  documentation;  on  some
       systems one should not call reboot(8) and halt(8) directly.)

GNU STANDARD OPTIONS
       --help Print  a usage message on standard output and exit(3,n,1 builtins) successfully.

       --version
              Print version(1,3,5) information on standard output, then exit(3,n,1 builtins) success-
              fully.

       --     Terminate option list.

ENVIRONMENT
       The  variables  LANG,  LC_ALL, LC_CTYPE, and LC_MESSAGES have the usual
       meaning.

CONFORMING TO
       POSIX 1003.2

NOTES
       On Linux, sync(1,2,8) is only guaranteed to  schedule  the  dirty  blocks  for
       writing;  it  can  actually take a short time(1,2,n) before all the blocks are
       finally written.  The reboot(8) and halt(8)  commands  take  this  into
       account by sleeping for a few seconds after calling sync(1,2,8)(2).

       This  page  describes sync(1,2,8) as found in(1,8) the fileutils-4.0 package; other
       versions may differ slightly.

SEE ALSO
       sync(1,2,8)(2), halt(8), reboot(8), update(7,n)(8)



GNU fileutils 4.0                   1998-11                            SYNC(8)

References for this manual (incoming links)