Linux tricks, one-liners & shell magic
← Back to all tricks
Show disk usage per directory

Find which directories are eating your disk space, sorted from largest to smallest.

bash
$ du -sh /* 2>/dev/null | sort -rh | head -20 # Show only current directory depth 1: du -sh ./*/ | sort -rh
diskwatcher2026-04-19
Delete this trick? This cannot be undone.