🎯 Mission Briefing: Disk Full
03:14 AM. Your phone buzzes. The monitoring system just paged you:
⚠️ ALERT:
/partition at 98% capacity onlinux. Applications are failing to write logs.
You're on call. Nobody else is awake. It's up to you.
Your objective
Find out what's eating the disk space, and free some up — without breaking anything important.
Investigation toolkit
df -h # How full is each partition?
du -sh /var/log/* # Which directories are biggest?
du -sh /* 2>/dev/null | sort -rh | head # Top-level space hogs, sorted
find / -size +100M -type f # Individual large files
ls -laS /var/log # Largest files in a directory, sorted
Once you find the culprit
sudo gzip largefile.log # Compress instead of deleting, if unsure
sudo rm oldfile.log # Delete if it's safe to lose
sudo truncate -s 0 /var/log/huge.log # Empty a log file without deleting it (keeps the file handle valid)
A real incident commander checks before deleting. Investigate first.