Linux & shell: Disk
3 Linux & shell commands: Disk. Click a command to see what each part does.
Linux & shell: DiskIndex
- Whole sheet251
- Navigate & list13
- Create, copy, move, delete13
- View & compare files9
- Permissions & ownership31
- Help & shell basics11
- Users & groups6
- Install packages7
- Package & software versions29
- System info9
- Network basics & SSH10
- Zip & compress4
- Shell operators6
- Processes6
- Files & search8
- Text processing pipelines4
- Disk3
- Network5
- Services & logs6
- Archives & copying4
- Firewall7
- Scheduling: cron & systemd timers6
- Storage, mounts & LVM10
- Kernel, hardware & limits8
- Performance & tracing10
- TLS & certificates8
- Packet capture & network debugging10
- Terminal tools8
Disk3
df -hT; df -iDisk space per filesystem (and inodes)What each part does
dfreport filesystem usage-hhuman-readable sizes-Tshow the filesystem typedf -iinode usage instead of space. A disk can be "full" on inodes
du -sh * | sort -rh | headBiggest items in the current folderWhat each part does
duestimate file/directory space-sone total per argument-hhuman-readable sizes*every entry in the current directory (shell glob)sort -rhsort human sizes (-h knows 2K < 1G), largest first (-r)headtop 10
du -xh -d 1 <dir> | sort -rh | head -n 15Folder sizes one level deep, same filesystemWhat each part does
-xdon't cross into other mounted filesystems-hhuman-readable-d 1only show totals one level below <dir> (same as --max-depth=1)sort -rh | head -n 15largest 15
Nothing matches.
My DevOps Playbook by Angelo John Calleja