Site icon New Generation Enterprise Linux

Stop df and du from telling you different lies about your disk space

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

Stop df and du from telling you different lies about your disk space

🧩 The Challenge

You stare at df and see the disk is full, but when you run du on the directory, the numbers don’t add up. It is maddening because you know space is being used, but the filesystem is hiding the culprit in plain sight.

💡 The Fix

Most of the time, this is happening because a deleted file is still being held open by a long-running process, which keeps the blocks from being freed. You just need to find those specific PIDs and kill the process or restart the service.

lsof +L1

⚙️ Why It Works

Adding the +L1 flag tells the command to show you files that have a link count of less than one, which basically filters for those pesky deleted files that are still hogging your storage.

🚀 Pro-Tip: If the process is something critical you can’t restart, try truncating the file with a redirect instead of waiting for the app to finish.

Linux Tips & Tricks | © ngelinux.com | 7/29/2026

0 0 votes
Article Rating
Exit mobile version