1*ca8106dfSsevan.\" $NetBSD: sync.8,v 1.16 2016/08/12 02:59:23 sevan Exp $ 249f0ad86Scgd.\" 37df690ffSmycroft.\" Copyright (c) 1980, 1991, 1993 47df690ffSmycroft.\" The Regents of the University of California. All rights reserved. 5c74b1689Smycroft.\" 67df690ffSmycroft.\" Redistribution and use in source and binary forms, with or without 77df690ffSmycroft.\" modification, are permitted provided that the following conditions 87df690ffSmycroft.\" are met: 97df690ffSmycroft.\" 1. Redistributions of source code must retain the above copyright 107df690ffSmycroft.\" notice, this list of conditions and the following disclaimer. 117df690ffSmycroft.\" 2. Redistributions in binary form must reproduce the above copyright 127df690ffSmycroft.\" notice, this list of conditions and the following disclaimer in the 137df690ffSmycroft.\" documentation and/or other materials provided with the distribution. 14b5b29542Sagc.\" 3. Neither the name of the University nor the names of its contributors 157df690ffSmycroft.\" may be used to endorse or promote products derived from this software 167df690ffSmycroft.\" without specific prior written permission. 1761f28255Scgd.\" 187df690ffSmycroft.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 197df690ffSmycroft.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 207df690ffSmycroft.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 217df690ffSmycroft.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 227df690ffSmycroft.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 237df690ffSmycroft.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 247df690ffSmycroft.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 257df690ffSmycroft.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 267df690ffSmycroft.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 277df690ffSmycroft.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 287df690ffSmycroft.\" SUCH DAMAGE. 2961f28255Scgd.\" 3049f0ad86Scgd.\" @(#)sync.8 8.1 (Berkeley) 5/31/93 317df690ffSmycroft.\" 32*ca8106dfSsevan.Dd August 12, 2016 3361f28255Scgd.Dt SYNC 8 34f1247650Sgarbled.Os 3561f28255Scgd.Sh NAME 3661f28255Scgd.Nm sync 377df690ffSmycroft.Nd force completion of pending disk writes (flush cache) 3861f28255Scgd.Sh SYNOPSIS 39400329beSenami.Nm 4061f28255Scgd.Sh DESCRIPTION 41416fd8edSfairThe 42416fd8edSfair.Nm 435b09090eSadprogram can be called to ensure that all disk writes have been 44416fd8edSfaircompleted before the processor is halted in a way not suitably done by 4561f28255Scgd.Xr reboot 8 4661f28255Scgdor 4761f28255Scgd.Xr halt 8 . 4861f28255ScgdGenerally, it is preferable to use 49416fd8edSfair.Xr reboot 8 5061f28255Scgdor 51416fd8edSfair.Xr halt 8 5261f28255Scgdto shut down the system, 5361f28255Scgdas they may perform additional actions 5461f28255Scgdsuch as resynchronizing the hardware clock 5561f28255Scgdand flushing internal caches before performing a final 56990562bfSwiz.Nm . 5761f28255Scgd.Pp 58416fd8edSfairThe 59416fd8edSfair.Nm 60416fd8edSfairprogram simply invokes the 6161f28255Scgd.Xr sync 2 62416fd8edSfairsystem call. 6361f28255Scgd.Sh SEE ALSO 6461f28255Scgd.Xr fsync 2 , 65bc5b87e7Swiz.Xr sync 2 , 6661f28255Scgd.Xr halt 8 , 67a69cc94bSjdolecek.Xr reboot 8 6861f28255Scgd.Sh HISTORY 6961f28255ScgdA 70416fd8edSfair.Nm 7161f28255Scgdcommand appeared in 72*ca8106dfSsevan.At v4 . 73