Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)
Stop letting deleted files hog your storage
🧩 The Challenge
You’ve wiped the massive log file that was killing your root partition, but df keeps telling you the disk is still full. It’s maddening to realize the process is still holding a file descriptor open, essentially keeping the data alive in the ether.
💡 The Fix
Use lsof to identify which zombie process is still clinging to those deleted files so you can bounce the service. It saves you from having to reboot a server just to reclaim space.
lsof +L1
⚙️ Why It Works
Adding the +L1 flag tells the system to report on all open files that have a link count of zero. By finding these, you pinpoint exactly which process needs a restart to release the blocks back to the filesystem.
🚀 Pro-Tip: Always check this before doing a desperate emergency reboot in production.
Linux Tips & Tricks | © ngelinux.com | 11/7/2026
