Disk Full on Linux: First Response Without Guessing
Start with filesystem evidence, separate byte exhaustion from inode exhaustion, then drill down only inside the mount that is actually full.
df -h
long-form guides
Use these guides when a single command is not enough. Each guide starts with safe inspection, links to focused commands, and points to scenario drills.
10 guides
Start with filesystem evidence, separate byte exhaustion from inode exhaustion, then drill down only inside the mount that is actually full.
df -h
Use read-only ranking commands to find candidates, then decide whether each file should be rotated, compressed, archived, truncated, or left alone.
find /var -xdev -type f -printf '%s %p\n' | sort -nr | head -20
Work from the outside in: DNS answer, TCP listener, Nginx config, service logs, then upstream application behavior.
dig +short example.com
DNS troubleshooting works best when you separate authoritative records, resolver cache, local cache, and the web server response path.
dig +short example.com
Logs become manageable when you narrow by service, time, severity words, and surrounding context instead of opening the whole file.
journalctl -u nginx --since '30 minutes ago' --no-pager
Permission failures are usually path problems, ownership problems, service-user problems, or mode problems. Inspect all four before changing anything.
namei -l /var/www/example/index.html
A dry run turns a risky sync into reviewable output. That matters most when `--delete`, backups, or deployment targets are involved.
rsync -avhn --delete ./source/ ./backup/
A port problem starts with socket evidence: address, port, protocol, process, and whether it is bound to localhost or a public interface.
sudo ss -tulpn
Use systemd's failed-unit state, then inspect one unit with status and journal output before deciding whether restart, config repair, or dependency work is needed.
systemctl --failed --no-pager
Build command confidence with realistic tasks: inspect first, predict output, run read-only checks, then compare results before changing systems.
df -h