ipdetecto.com logo
ipdetecto.com
My IPSpeed
Knowledge Hub
HomeKnowledge HubLinux Disk Usage Commands
© 2026 ipdetecto.com
support@ipdetecto.comAboutContactPrivacyTermsllms.txt
Troubleshooting
5 MIN READ
Apr 19, 2026

Linux Disk Usage Commands

Measure filesystem and directory consumption: df, du, lsblk, findmnt, and telling inode exhaustion from free space.

Disk issues show up as “no space left” even when space looks fine—check inode exhaustion with df -i. df -h summarizes mount points; du -sh totals directories. lsblk maps block devices to mounts; findmnt shows propagation and options. For deep hunts, combine du with sort or use ncdu when installed.

CommandShowsTypical flags
dfFilesystem capacity per mount-h human, -i inodes, -T types
duDirectory usage-sh summary, -x stay on fs
lsblkDisks, partitions, mounts-f filesystems, -o columns

Related

find command, sysadmin commands, process management, sudo

Frequently Asked Questions

Q.Why does df show space while writes fail?

The filesystem may be out of inodes or a quota may apply—check df -i and project quotas.

Q.What does du -x accomplish?

It skips directories on other filesystems so totals reflect only the target mount.

Q.How do I find the largest directories quickly?

Run du on top-level paths and sort numerically, or use ncdu for an interactive drill-down.

Q.What is the difference between df and du?

df reports filesystem-wide free space; du measures usage of directory trees and can disagree with df until unlinked files close.

Q.Why can deleted files still consume space?

Open file descriptors keep blocks allocated until processes close—use lsof to find deleted-but-open files.

Q.How does findmnt help troubleshooting?

It lists mount points with options and sources—useful when bind mounts or namespaces hide expected layouts.

Q.When should I use lsblk?

When mapping NVMe or LVM devices to mount points before resizing or replacing disks.

Q.What does btrfs or ZFS change for these commands?

Snapshots and subvolumes can share blocks—df and du may need subvolume-aware tools for accurate accounting.
TOPICS & TAGS
dfdulinux disk spaceinodelsblk