Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)
Find out who is hogging the disk space with ncdu
🧩 The Challenge
Everyone has dealt with a production server screaming about being at 99% disk capacity. Running du -sh * in a directory with half a million files is a nightmare that just leaves you staring at a blinking cursor while the disk churns.
💡 The Fix
Skip the standard tools and use ncdu instead. It provides an interactive interface that lets you browse through directories and delete junk on the fly without guessing what’s taking up the bulk of the bytes.
sudo apt install ncdu && sudo ncdu /
⚙️ Why It Works
Since it keeps an index of the directory structure in memory as it scans, you get a navigable view that highlights exactly which subdirectory is holding those massive, forgotten log files.
🚀 Pro-Tip: Use the -x flag to keep the scan on a single filesystem so you don’t accidentally crawl your entire network-mounted home directory.
Linux Tips & Tricks | © ngelinux.com | 7/12/2026
