Monday, 25 November 2013

Finding Disk Space using command line in Ubuntu


Let see how we can use the “df” command to find the disk space and partitions in Ubuntu
First open a terminal. Now type the command “df –h”. This will show an output as shown in the picture below. Here the option “-h” is used to produce the output in human readable form

 
As you can see the output will have 6 columns. First one is the “Filesystem”, second showing the total size, third the used space, fourth the remaining space, fifth the space usage in percentage and the last column shows where it is mounted.
Now if we want to get the total also just add one more option to the command. The option is “- -total”. Now the command become “df –h - -total”. As shown below it will show the total disk space, total usage, total free and the total usage percentage.

No comments:

Post a Comment