xref: /original-bsd/bin/sync/sync.8 (revision 60e1d6e0)
1.\" Copyright (c) 1980, 1991 Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"	@(#)sync.8	6.4 (Berkeley) 06/23/92
7.\"
8.Dd
9.Dt SYNC 8
10.Os BSD 4
11.Sh NAME
12.Nm sync
13.Nd force completion of pending disk writes (flush cache)
14.Sh SYNOPSIS
15.Nm sync
16.Sh DESCRIPTION
17.Nm Sync
18can be called to insure that all disk writes have been completed before the
19processor is halted in a way not suitably done by
20.Xr reboot 8
21or
22.Xr halt 8 .
23Generally, it is preferable to use
24.Xr reboot
25or
26.Xr halt
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
31.Nm sync .
32.Pp
33.Nm Sync
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
45.Nm sync
46command appeared in
47.At v6 .
48