---
name: "fsync"
section: "1"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/fsync"
---

# fsync(1)

synchronize a file's in-core state with that on disk

## NAME

**fsync** – synchronize a file's in-core state with that on disk

## SYNOPSIS

**fsync** *file ...*

## DESCRIPTION

The **fsync** utility causes all the modified data and meta-data of all the files named on the command line to be written to a permanent storage device.

The **fsync** utility uses the [fsync(2)](/fsync/2.md) function call.

## EXIT STATUS

If an error occurs, the **fsync** utility proceeds to the next file, and exits \>0. Otherwise, it exits 0.

## SEE ALSO

[fsync(2)](/fsync/2.md), [sync(2)](/sync/2.md), [syncer(4)](/syncer/4.md), [halt(8)](/halt/8.md), [reboot(8)](/reboot/8.md)

## HISTORY

The **fsync** command first appeared in FreeBSD 4.3.
