Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)
Find that hidden disk hog holding onto deleted files
đź§© The Challenge
You finally clear off space by nuking a massive log file, but df still says the partition is pegged at 100 percent. It’s the kind of silent failure that ruins your weekend when the database crashes because it can’t write a single lock file.
đź’ˇ The Fix
Use lsof to see which process still has a file descriptor open for the stuff you thought you deleted. It’s the only way to find out which zombie process is pinning that disk space.
lsof +L1
⚙️ Why It Works
Adding the +L1 flag tells the tool to list all open files that have a link count of less than one. The kernel won’t actually free those blocks until the process closes the handle, so identifying the PID and bouncing the service is the only way out.
🚀 Pro-Tip: If you don’t want to restart the service, just truncate the file from /proc/PID/fd/ instead of deleting it.
Linux Tips & Tricks | © ngelinux.com | 11/20/2026
