Command
sudo du -xhd1 / 2>/dev/null | sort -hWhen to use it
Run this after confirming that the root partition or another volume is nearly full.
How it works
- -x stays on the same filesystem.
- -d1 limits analysis to the first directory level.
- sort -h sorts human-readable sizes.
Precautions
- The scan can generate storage load on a large server.
- Do not delete a system directory based on size alone.
Rollback
Read-only operation.