4.4BSD snapshot (revision 8.1)
[unix-history] / usr / src / bin / sync / sync.8
CommitLineData
5a4fc040
KB
1.\" Copyright (c) 1980, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
a15750af 3.\"
07a0a16d 4.\" %sccs.include.redist.roff%
a15750af 5.\"
5a4fc040 6.\" @(#)sync.8 8.1 (Berkeley) %G%
0fccfdb8
CL
7.\"
8.Dd
9.Dt SYNC 8
10.Os BSD 4
11.Sh NAME
12.Nm sync
07a0a16d 13.Nd force completion of pending disk writes (flush cache)
0fccfdb8 14.Sh SYNOPSIS
07a0a16d 15.Nm sync
0fccfdb8 16.Sh DESCRIPTION
07a0a16d 17.Nm Sync
b4cfb2d9 18can be called to insure that all disk writes have been completed before the
a15750af 19processor is halted in a way not suitably done by
0fccfdb8 20.Xr reboot 8
a15750af 21or
0fccfdb8 22.Xr halt 8 .
b4cfb2d9 23Generally, it is preferable to use
0fccfdb8 24.Xr reboot
b4cfb2d9 25or
0fccfdb8 26.Xr halt
b4cfb2d9
MK
27to shut down the system,
28as they may perform additional actions
29such as resynchronizing the hardware clock
30and flushing internal caches before performing a final
07a0a16d 31.Nm sync .
0fccfdb8 32.Pp
07a0a16d 33.Nm Sync
0fccfdb8
CL
34utilizes the
35.Xr sync 2
36function call.
37.Sh SEE ALSO
38.Xr sync 2 ,
39.Xr fsync 2 ,
40.Xr halt 8 ,
41.Xr reboot 8 ,
42.Xr update 8
43.Sh HISTORY
44A
07a0a16d
CL
45.Nm sync
46command appeared in
47.At v6 .