14aeb1c05SPaul Saab.\" Copyright (c) 2000 Paul Saab <ps@FreeBSD.org> 24aeb1c05SPaul Saab.\" All rights reserved. 34aeb1c05SPaul Saab.\" 44aeb1c05SPaul Saab.\" Redistribution and use in source and binary forms, with or without 54aeb1c05SPaul Saab.\" modification, are permitted provided that the following conditions 64aeb1c05SPaul Saab.\" are met: 74aeb1c05SPaul Saab.\" 1. Redistributions of source code must retain the above copyright 84aeb1c05SPaul Saab.\" notice, this list of conditions and the following disclaimer. 94aeb1c05SPaul Saab.\" 2. Redistributions in binary form must reproduce the above copyright 104aeb1c05SPaul Saab.\" notice, this list of conditions and the following disclaimer in the 114aeb1c05SPaul Saab.\" documentation and/or other materials provided with the distribution. 124aeb1c05SPaul Saab.\" 134aeb1c05SPaul Saab.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 144aeb1c05SPaul Saab.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 154aeb1c05SPaul Saab.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 164aeb1c05SPaul Saab.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 174aeb1c05SPaul Saab.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 184aeb1c05SPaul Saab.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 194aeb1c05SPaul Saab.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 204aeb1c05SPaul Saab.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 214aeb1c05SPaul Saab.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 224aeb1c05SPaul Saab.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 234aeb1c05SPaul Saab.\" SUCH DAMAGE. 244aeb1c05SPaul Saab.\" 2587d8e3c2SSuleiman Souhlal.Dd January 25, 2005 262333aeefSPaul Saab.Dt FSYNC 1 274aeb1c05SPaul Saab.Os 284aeb1c05SPaul Saab.Sh NAME 294aeb1c05SPaul Saab.Nm fsync 304aeb1c05SPaul Saab.Nd synchronize a file's in-core state with that on disk 314aeb1c05SPaul Saab.Sh SYNOPSIS 328fe908efSRuslan Ermilov.Nm 33176e8228SPaul Saab.Ar 344aeb1c05SPaul Saab.Sh DESCRIPTION 350b113423SSheldon HearnThe 360b113423SSheldon Hearn.Nm 370b113423SSheldon Hearnutility causes all the modified data and meta-data of 380b113423SSheldon Hearnall the files named on the command line 390b113423SSheldon Hearnto be written to a permanent storage device. 404aeb1c05SPaul Saab.Pp 410b113423SSheldon HearnThe 420b113423SSheldon Hearn.Nm 430b113423SSheldon Hearnutility uses the 44176e8228SPaul Saab.Xr fsync 2 454aeb1c05SPaul Saabfunction call. 4687d8e3c2SSuleiman Souhlal.Sh EXIT STATUS 4787d8e3c2SSuleiman SouhlalIf an error occurs, the 4887d8e3c2SSuleiman Souhlal.Nm 4987d8e3c2SSuleiman Souhlalutility proceeds to the next file, and exits >0. 5087d8e3c2SSuleiman SouhlalOtherwise, it exits 0. 514aeb1c05SPaul Saab.Sh SEE ALSO 524aeb1c05SPaul Saab.Xr fsync 2 , 534aeb1c05SPaul Saab.Xr sync 2 , 542333aeefSPaul Saab.Xr syncer 4 , 554aeb1c05SPaul Saab.Xr halt 8 , 564aeb1c05SPaul Saab.Xr reboot 8 574aeb1c05SPaul Saab.Sh HISTORY 584aeb1c05SPaul SaabThe 594aeb1c05SPaul Saab.Nm 604aeb1c05SPaul Saabcommand first appeared in 6186f47875SSheldon Hearn.Fx 4.3 . 62