Linux Disk and Memory
df, du, free when disks fill or RAM runs out.
- df du
- disk full
- free memory
- inodes
- lsof
Linux Disk and Memory
df, du, free when disks fill or RAM runs out.
Commands
| Command | What it does |
|---|---|
df -h | Filesystem usage, human readable |
du -sh top dirs, sorted | Top-level disk hogs |
free -h | RAM and swap overview |
vmstat 1 5 | CPU, memory, IO snapshot |
lsof +L1 | Deleted but still-open files |
Example
df -h
df -i # inodes can fill before bytes
du -sh /var/log/* | sort -h | tail
FAQ
df full but du small - why?
Deleted files held open by processes, or exhausted inodes from millions of tiny files.
Swap at 100 percent - panic?
Check what swapped and whether the OOM-killer logged victims in dmesg.
Câu hỏi thường gặp
df full but du small - why?
Deleted files held open by processes, or exhausted inodes from millions of tiny files.
Swap at 100 percent - panic?
Check what swapped and whether the OOM-killer logged victims in dmesg.
Linux
Linux Files and Directories
Navigate, create, move, and inspect files with core commands.
Linux Permissions
Read ls output, chmod, chown, and sudo without breaking access.
Linux Text Processing
cat, head, cut, sort, uniq, and awk for daily data shaping.
Linux grep and find
Find files by name, age, and size; search inside them fast.