Ubuntu Tech Snippet #7 – Find the remaining disk space in all mounted partitions

Many people have several partitions on their systems for different OSes or even different partitions within one OS. This tech snippet is an easy way to find out how many more videos, applications, songs, and documents you have space for.

First off you need to start up a terminal window, you can do this by pressing Ctrl+Alt+T.

terminal

Empty Terminal Window – Open via Ctrl+Alt+T

Next, enter the command:

df
df terminal

Terminal Window running the df command

This brings up the results you see in the image above. However, seeing space available in 1K blocks can be relatively useless for the average user. So, here’s a flag you can add to make the output slightly more understandable:

Clear the terminal screen (clear) and run the df command again, except this time, include the -h flag:

df -h

 

df -h terminal

Terminal window running the df -h command

This flag, which stands for Human readable, takes the 1k blocks from regular df and converts the to slightly easier-to-understand units like Megabytes and Gigabytes. All of the columns remain the same, just the units have changed. As you can see in the screenshot above, I have a 36GB partition with 34GB used and 565MB available.

While not particularly useful for the average user, it is a very handy tool for more advanced Ubunt-ites and for systems (like servers) without GUIs, this becomes a must-have tool.

Tell us what you thought!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: