Find what fills disks: `df` shows filesystem capacity, `du` exposes directory usage. 15.11.2025 | reading time: 3 min Want to know what fills a Linux disk? Use `df` to view overall filesystem capacity and `du` to measure how much space directories and files consume; this short guide shows commands you can run now and explains why their numbers sometimes differ. Quick hands-on example Run `df -h` to list mounted filesystems and free space: ``` Filesystem Size Used Avail Use% Mounted on /dev/sda1 50G 28G 20G 59% / /dev/sda2 200G 150G 40G 79% /home tmpfs 1.0G 0 1.0G 0% /run ``` Then inspect large directories with `du -sh /var` or summarize top-level directories with `du -xh --max-depth=1 /`: ``` 2.1G /var 1.4G /usr 300M /home ``` Use these commands to pinpoint cleanup targets and verify results with `df -h` afterward. Fast du recipes to run Tell the system where to look: `du -sh *` shows human-readable sizes for items in the current directory; `du --max-depth=1 -h /path` gives a one-line summary per child; `du -ah` reveals individual files; `du --apparent-size` reports logical file sizes rather than actual disk blocks; and `df -hT` or `df -i` reveal filesystem types and inode usage when relevant. When numbers don't add up If `df` reports more used space than `du` totals, act: check for deleted-but-open files with `lsof +L1`, verify bind mounts and nested mounts with `mount` and `findmnt`, and consider sparse or compressed files which change apparent versus actual size; running `sync` and then rechecking can help reveal transient differences. Tools that help visually Install `ncdu` for an interactive, fast directory browser that uses `du` data; try `duf` or similar modern `df`-style utilities for a clearer summary; use `find` to locate very large files with `-size` tests and combine with `xargs` to act immediately. Clean finish and next steps Start by identifying the biggest directories with `du` and then confirm filesystem-wide totals with `df`; automate routine checks in scripts and schedule cleanup for log rotation or large temporary directories, and consider learning deeper storage topics to avoid surprises in production environments, including pursuing certifications like CompTIA Linux+ or LPIC-1 with intensive exam preparation at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. filesystem utilities storage troubleshooting