Stop mounting yourself into a corner with bind mounts
Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)
Stop mounting yourself into a corner with bind mounts
🧩 The Challenge
You’ve definitely had that moment where you ran find or du on a directory and the output ballooned because you accidentally descended into a bind-mounted filesystem you didn’t even realize was there. It’s a classic way to ruin a perfectly good disk usage report and waste ten minutes of your life.
💡 The Fix
Use the one-filesystem flag to keep your scans locked to the actual partition you care about. It saves you from traversing into alien mount points that don’t belong to the directory tree you’re auditing.
du -xh /path/to/check
⚙️ Why It Works
Setting the x flag tells the utility to skip directories that sit on a different device than the one you started on. It keeps your data clean and stops you from indexing half the system by accident.
🚀 Pro-Tip: Alias it to dux in your bashrc and save yourself the keystrokes.
Linux Tips & Tricks | © ngelinux.com | 8/26/2026
