Categories

Tuesday, 20 March 2012

Disk Space Commands on Linux


Linux console is the best place for a system admin, some useful commands to check disk space on a linux system are:

Show files by size, biggest last:

ls -lSr

Show top disk users in current dir.

du -s * | sort -k1,1rn | head

Show free space on mounted filesystems

df -h

Show free inodes on mounted filesystems

df -i

Show disks partitions sizes and types

fdisk -l

List all packages by installed size (Bytes) on rpm distros

rpm -q -a --qf '%10{SIZE}\t%{NAME}\n' | sort -k1,1n

No comments:

Post a Comment

Ad