Friday, January 16, 2009

Determining Hard Disk Space on Linux

The df (i.e. disk free) linux command line is used to displays information about your hard disks or your mount devices, such as the amount of available disk space.

Code :
$ df -h

Example :
[msmunir@msmunir1 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
54G 20G 32G 39% /
/dev/sda1 190M 19M 162M 11% /boot
tmpfs 247M 48K 247M 1% /dev/shm
gvfs-fuse-daemon 54G 20G 32G 39% /home/msmunir/.gvfs
/dev/sdb1 7,5G 6,1G 1,5G 82% /media/MSMUNIR8
/dev/sdc1 150G 90G 60G 60% /media/MSMUNIR7
[msmunir@msmunir1 ~]$

Explanation :
Device /dev/mapper/VolGroup00-LogVol00 is my local hard disk. It has capacity around 60 GB.
Device /dev/sdb1 is my USB flashdrive. It has capacity around 8 GB.
Device /dev/sdc1 is my external hard disk. It has capacity around 160 GB.

Explore others related tool : du, ls, find
by.msmunir@batan.go.id

No comments:

Post a Comment