Stop hunting for massive files by trial and error

Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)

Stop hunting for massive files by trial and error

🧩 The Challenge

Dealing with a disk that is somehow 100 percent full but finding nothing in your usual log directories is a special kind of hell. I have spent way too much time manually digging through directory trees while production services are literally crashing because they cannot write a temp file.

💡 The Fix

Use a quick command to sort the largest directories in your current location so you can spot the hidden bloat immediately. It saves you from guessing which folder is actually hoarding all your storage.

du -ahx . | sort -rh | head -n 20

⚙️ Why It Works

This chain grabs everything, formats it human-readable, filters out other filesystems so you don’t end up listing your entire network mount, and then puts the biggest offenders right at the top of your terminal.

🚀 Pro-Tip: Alias this to something like ‘bigs’ and you will thank yourself next time an application starts writing log files to the wrong partition.

Linux Tips & Tricks | © ngelinux.com | 10/2/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted