How to check hard drive capacity in linux
as a network admin of course we are required to know about the state of the server, not least about how much hard disk capacity is already in use by the system and for data storage.
Especially if the server is a storage server, then how much hard drive capacity is used absolutely must know.
Here are the commands associated with these needs:
udiniq@blackstone:~/Desktop$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 52888108 5124808 45076736 11% /
udev 242304 4 242300 1% /dev
tmpfs 99728 788 98940 1% /run
none 5120 0 5120 0% /run/lock
none 249316 144 249172 1% /run/shm
if you want to display in units of hard disk capacity, then the command
udiniq@blackstone:~/Desktop$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 51G 4.9G 43G 11% /
udev 237M 4.0K 237M 1% /dev
tmpfs 98M 788K 97M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 244M 144K 244M 1% /run/shm

