hero4hire
Linux

Find what's eating disk space

Walk down from the root to the directory actually holding the bytes.

Summarize by directory

bash
du -h --max-depth=1 / 2>/dev/null | sort -rh | head -20

Repeat with a deeper path once a large directory turns up, narrowing one level at a time.

Find individual large files

bash
find / -xdev -type f -size +500M -exec ls -lh {} \; 2>/dev/null

-xdev keeps the search on one filesystem, so it doesn't wander into mounted volumes.

On this page