Linux

du

SafeDirectory size

du -sh *

Find what is consuming disk space.

Examples

  • du -sh * | sort -rh | headTop consumers, largest first

Syntax

du -sh <path>/* | du -ah | sort -rh | head

Before you run it

Read-only.

Used when you see

Disk is full
2
Find what's consuming itChase the largest first
See the whole flow →
Logs are eating the disk
2
Find the bloat with per-directory usage
See the whole flow →

Related commands

  • dfDisk free space

The same reference, with no signal at all

Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store