Stop letting lsof chase ghosts when your disk is full
Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)
Stop letting lsof chase ghosts when your disk is full
🧩 The Challenge
You’ve finally tracked down that massive log file taking up all your space, deleted it, but the df output didn’t budge an inch. It’s a special kind of hell when the kernel keeps holding onto deleted files because some stubborn process still has the file descriptor open.
💡 The Fix
Instead of guessing which process is being difficult, you can force the system to show you exactly which hidden files are still consuming blocks despite being marked as deleted. It saves you from rebooting a production server just to reclaim space.
lsof +L1
⚙️ Why It Works
Adding the +L1 flag tells the command to only list open files that have a link count of less than one, which is the smoking gun for files you deleted but that the process still keeps alive in memory.
🚀 Pro-Tip: Just pipe that to awk and send a HUP signal to the PID to make the application reload its logs without a restart.
Linux Tips & Tricks | © ngelinux.com | 12/1/2026
