Displaying Available Disk Space

linux-penguinThere are a number of commands that can be used to display disk space.  This article describes how to get this basic information.


df Command

To get an overview of disk space usage, type the following.

df -h

The -h flag displays the information in a 'human readable' format.

Filesystem       Size  Used Avail Use% Mounted on
/dev/sda1         3G  2G   1G  66% /
none             1.5G  256K  1.5G   1% /dev
none             1.5G  472K  1.5G   1% /dev/shm
none             1.5G  400K  1.5G   1% /var/run
none             1.5G     0  1.5G   0% /var/lock
tmpfs            1.5G  596K  1.5G   1% /var/log
tmpfs            1.5G  8.0K  1.5G   1% /var/log/apt
/dev/sdb2        900G  70M  899G  1% /home

 

du Command

The du command can give you disk usage at the directory level.  Try running the following...

du -h

This will display disk usage for the present working directory.

du -h /home

This will display disk usage for the /home directory

 

You can also try the following commands...

  • pydf
  • discus
  • di

 

Thanks for visiting.