Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)
Stop your filesystems from lying to you about space
🧩 The Challenge
You ever run df and see 100% disk usage, but then you go to the directory and find nothing large enough to explain it? It’s enough to make you want to throw your keyboard out the window.
💡 The Fix
Most of the time, some process is still holding a deleted log file open, so the kernel won’t actually reclaim the blocks until that process exits. Using lsof to find these hidden zombies will save your production server from a midnight panic.
lsof +L1
⚙️ Why It Works
Adding the +L1 flag tells lsof to filter specifically for open files that have a link count of zero, which are exactly the files eating up your space despite being invisible to standard directory listing tools.
🚀 Pro-Tip: Just restart the process holding the file instead of nuking the whole service.
Linux Tips & Tricks | © ngelinux.com | 12/5/2026
