---
name: "sync"
section: "8"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["linux", "freebsd", "openbsd", "macos"]
url: "https://new.carta.tech/sync/8"
---

# sync(8)

force completion of pending disk writes (flush cache)

## NAME

**sync** – force completion of pending disk writes (flush cache)

## SYNOPSIS

**sync**

## DESCRIPTION

The **sync** utility can be called to ensure that all disk writes have been completed before the processor is halted in a way not suitably done by [reboot(8)](/reboot/8.md) or [halt(8)](/halt/8.md). Generally, it is preferable to use [reboot(8)](/reboot/8.md) or [halt(8)](/halt/8.md) to shut down the system, as they may perform additional actions such as resynchronizing the hardware clock and flushing internal caches before performing a final **sync**.

**sync** utilizes the [sync(2)](/sync/2.md) function.

## SEE ALSO

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

## HISTORY

A **sync** command appeared in Version 4 AT&T UNIX.
