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 and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store