*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> sync (2)              
Title
Content
Arch
Section
 

SYNC(2)

Contents


NAME    [Toc]    [Back]

     sync - synchronize disk block in-core status with that on disk

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <unistd.h>

     void
     sync(void);

DESCRIPTION    [Toc]    [Back]

     The sync() function forces a write of dirty (modified) buffers in the
     block buffer cache out to disk. The kernel keeps this information in core
     to reduce the number of disk I/O transfers required by the system.  As
     information in the cache is lost after a system crash, kernel thread
     ioflush ensures that dirty buffers are synced to disk eventually. By
     default, a dirty buffer is synced after 30 seconds, but some filesystems
     exploit ioflush features to sync directory data and metadata faster
     (after 15 and 10 seconds, respectively).

     The function fsync(2) may be used to synchronize individual file descriptor
 attributes.

SEE ALSO    [Toc]    [Back]

      
      
     fsync(2), sync(8)

HISTORY    [Toc]    [Back]

     A sync() function call appeared in Version 6 AT&T UNIX.

BUGS    [Toc]    [Back]

     sync() may return before the buffers are completely flushed.

BSD                              June 4, 1993                              BSD
[ Back ]
 Similar pages
Name OS Title
fdatasync HP-UX synchronize a file's in-core and on-disk states
fsync HP-UX synchronize a file's in-core and on-disk states
fsync OpenBSD synchronize a file's in-core state with that on disk
fsync FreeBSD synchronize a file's in-core state with that on disk
fsync NetBSD synchronize a file's in-core state with that on disk
fdatasync Linux synchronize a file's in-core data with that on disk
fsync Linux synchronize a file's complete in-core state with that on disk
nvtagpg Tru64 Displays a disk block formatted as a tag directory
amdsp HP-UX display the status and operating configuration of the disk array
disklabel Tru64 Reads and writes a disk pack label and formats disk partitions
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service