Disk Commands

To see a listing of disks partition table

fdisk -l
fdisk -l /dev/sda

To see the amount of disk space available on the file system

df -h
df -k /home

And to just get the % of space available in the /home directory

df k /home |tail -1| awk '{print $5}' | sed 's/%//'

Disk usage du shows the amount of data a directory uses

du -h
du -s


Subscribe to RSS - linux-advanced