See who is actually eating your disk space while you sleep

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

See who is actually eating your disk space while you sleep

🧩 The Challenge

You get the alert that a partition is at 98 percent, but every time you run a standard disk usage check, the numbers just don’t add up to what df is reporting. I’ve spent an entire afternoon chasing down a massive log file that was deleted but held open by a stubborn background process.

💡 The Fix

Use lsof to spot those deleted files that are still hogging space because a process hasn’t let go of the file handle. It’s the only way to see what’s actually chewing up the blocks behind the scenes.

lsof +L1 /

⚙️ Why It Works

This flags files with a link count of zero that are still open by a process. The system can’t reclaim the space until that specific PID closes the connection, which is why your df output stays stuck even after you delete the file.

🚀 Pro-Tip: Pipe it into awk if you want a clean list of just the PIDs so you can kill them immediately.

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

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted