Back to the command reference

sync

DisksFundamentals In simulator In real Linux

Flush cached writes to disk

Name: sync

You can practise it right away in the simulator, and use it in real Linux mode too.

Description

sync flushes cached writes from memory to disk right away. Linux buffers writes for speed, so running sync before pulling a storage device is safer (a proper unmount does this for you).

Syntax

sync [FILE]...

Common options

-f / --file-systemOnly the file system the file is on

Examples

  • $ sync

    Make sure data is written before unplugging

    Explain

Related