Disk Usage (df, du)
Diagnose disk capacity and identify massive directory footprints using df -h and du -sh.
Disk Usage (df, du) is an essential topic in LINUX.
Overview
Mastering disk usage (df, du) provides the core mental model and practical skills needed for real-world software engineering workflows.
# Check free disk space across all mounted filesystems in human-readable GB/MB
df -h
# Check size of specific directory and its subfolders
du -sh /var/log/* | sort -hr | head -n 5
Key Concepts
- Understand the fundamental syntax, commands, and architecture.
- Learn standard conventions, safety guardrails, and common pitfalls.
- Apply practical idioms directly in production environments.
[!TIP] Practice these core patterns thoroughly. Next, proceed to linux-cron-automation.