Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)
Stop staring at du to find where your disk space went
🧩 The Challenge
You get the alert that a partition is at 98 percent, but du takes a literal eternity to scan the directory tree because of millions of small files. I’ve wasted way too much time watching a blinking cursor while a production box grinds to a halt under the I/O load.
💡 The Fix
Use the ncdu utility instead of standard du to get an interactive, ncurses-based view of your disk usage. It builds a map in memory so you can navigate and delete garbage instantly without re-scanning.
ncdu /path/to/directory
⚙️ Why It Works
By indexing the directory structure into RAM, this tool lets you drill down into bloated folders without repeatedly hitting the physical disk. It turns a miserable 10-minute command-line slog into a five-second cleanup operation.
🚀 Pro-Tip: Use the -x flag to keep it from jumping onto other mounted filesystems and blowing your scan scope wide open.
Linux Tips & Tricks | © ngelinux.com | 10/23/2026
