OnCallReady

Commands

du - estimate file space usage

du [-h] [-s] [-x] [--max-depth=N] [path]

Options you will use

-h, --human-readable
Print sizes in K, M, G.
-s, --summarize
One total per argument.
-x, --one-file-system
Skip directories on other filesystems. Essential when starting at /.
--max-depth=N
Only report totals down to N levels.
-a
Report for files as well as directories.
--apparent-size
Print the file size (bytes in it) instead of the disk space used.
--inodes
Count inodes (files) instead of space.
-k
Sizes in kilobytes (1024 bytes).

Examples

$ sudo du -xh / --max-depth=2 2>/dev/null | sort -h | tail -10

top 10 biggest directories, staying on one filesystem

Gotchas

Taught in

Try du in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.