Web Server Rescue
Read-onlyCheck Filesystem Space with df
Writes are failing and you need to prove which mounted filesystem is full before deleting or moving anything.
Command
df -h
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not use it to choose a file to delete. `df` tells you the full mount; `du` or `find` tells you what is using space inside it.
Expected output
A filesystem table with Size, Used, Avail, Use%, and Mounted on. Use% tells byte pressure; Mounted on tells the filesystem scope where cleanup must happen.
System impact
Read-only. Nothing changes. The command reports mounted filesystem usage, not individual file or directory size.
Recovery / rollback: no state is changed.
When to use it
Use first in disk triage so cleanup stays inside the filesystem that is actually full.
When not to use it
Do not use it to choose a file to delete. `df` tells you the full mount; `du` or `find` tells you what is using space inside it.
Use% vs Mounted on
Do not clean the path named by the application error until you know which mount is actually full. The Mounted on column is the cleanup boundary.
df -hdu -xhd1 /var 2>/dev/null | sort -h
Common misread
A low Use% on one filesystem does not prove the host has space. Check the specific mount that contains the failing path, then check inodes if bytes look fine.
df -h /vardf -ih /var
next steps
Related commands
Find Large Directories with du
Once you know a filesystem is full, the next question is where.
du -xh --max-depth=1 /var 2>/dev/null | sort -h
Find Which Folder Is Filling the Disk
The disk was full. The fastest clue was the folder, not the file.
du -sh /var/* 2>/dev/null | sort -h
Check Inodes When Disk Space Looks Fine
Sometimes the disk has free bytes but still cannot create files.
df -ih
Check Bytes and Inodes Before Cleanup
No space left can mean full bytes, full inodes, or both.
df -h /var && df -ih /var
Inspect Release Disk Usage
Disk pressure during deploys often starts in old release directories.
du -sh releases/* 2>/dev/null | sort -h | tail -10
next diagnostic step
Where to go from this command
- Linux disk full hub Use when df shows byte pressure on a filesystem.
- Docker disk full hub Use when Docker storage is the pressure source.
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.