Command-Line – How to Get Disk Usage

command linedisk-usage

How can I get the current disk usage (in %) of my hard drive from the command line?

Best Answer

By using the df command.

Here's an example output:

$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1            303537496  27537816 260580948  10% /
none                    950788       252    950536   1% /dev
none                    959516       232    959284   1% /dev/shm
none                    959516       388    959128   1% /var/run
none                    959516         0    959516   0% /var/lock

Also take a look at its manpage.

Related Question