'\"macro stdmacro .if n .pH g2.sync @(#)sync 40.11 of 1/3/91 .\" Copyright 1991 UNIX System Laboratories, Inc. .\" Copyright 1989, 1990 AT&T .nr X .if \nX=0 .ds x} sync 2 "" "\&" .if \nX=1 .ds x} sync 2 "" .if \nX=2 .ds x} sync 2 "" "\&" .if \nX=3 .ds x} sync "" "" "\&" .TH \*(x} .SH NAME \f4sync\f1 \- update super block .SH SYNOPSIS \f4#include \f1 .PP \f4void sync(void);\f1 .SH DESCRIPTION \f4sync\fP causes all information in memory that should be on disk to be written out. This includes modified super blocks, modified i-nodes, and delayed block I/O. .PP It should be used by programs that examine a file system, such as \f4fsck\fP(1M), \f4df\fP(1M), etc. It is mandatory before a re-boot. .PP The writing, although scheduled, is not necessarily completed before \f4sync\fP returns. The \f4fsync\fP system call completes the writing before it returns. .SH "SEE ALSO" \f4fsync\fP(2)