Discover how to find which files and folders eat your disk space using the du command. 09.03.2026 | reading time: 3 min When a filesystem fills up, he needs facts fast; the `du` command provides those facts by reporting disk usage per file and directory, making it easier to find what to prune or archive. A clear scenario An operations admin notices an alert for low space on /var and wants the biggest culprits; run `du -sh /var/*` to get a quick overview and see human-readable totals in one sweep: ```du -sh /var/* 4.0K /var/cache 12M /var/backups 128M /var/log 2.0G /var/lib``` Drill down quickly To inspect top-level directories and their sizes use `du -h --max-depth=1 /var` to get a readable tree for immediate triage, for example: ```du -h --max-depth=1 /var 4.0K /var/cache 12M /var/backups 128M /var/log 2.0G /var/lib 2.2G /var``` Compare and filter Combine `du` with sorting to find the biggest items: `du -sk /var/* | sort -nr | head -n 10` prints kilobytes then sorts numerically so the largest entries surface first; this pipeline is fast and scriptable for recurring checks. Fine control and pitfalls Use `-s` to summarize, `-a` to include files, `--apparent-size` to show logical size instead of blocks, `--exclude` to ignore patterns, and `-B` to set block size; remember that sparse files and filesystem block rounding can make reported totals differ from `ls` apparent sizes, so choose the option that matches the question he is answering. Integrations and automation `du` plays well with other tools: feed results into monitoring, archive the largest paths, or use it inside scripts to trigger cleanup; for interactive exploration consider piping to `sort -h` or invoking `du` from `cron` to record trends over time. What to try next Practice by hunting the top 10 directories on a test system and compare `du` results with `df` and `ls` to understand differences; keep learning, pursue deeper sysadmin skills and consider exam preparation such as CompTIA Linux+ or LPIC-1 with intensive resources at bitsandbytes.academy to turn practical skill into certification. Join Bits & Bytes Academy First class LINUX exam preparation. filesystem utilities storage troubleshooting