Aleksandar's computer workshop

Let's see what Aleksandar was fixing today.
My findings, tips & tricks related to computers, internet, programming and other stuff I was working with.

Free disk space checking in Linux

There are plenty of tools with which you can check your disk space.
However, Linux already has a built in function to show you just what you need to know.
Open a terminal window or push (ctrl+alt+F1 to go to console) and type:


You will see something like this:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hdb2             12262868   2383044   9256904  21% /
/dev/hdb1               101086     11096     84771  12% /boot
none                     95580         0     95580   0% /dev/shm

This one is bit unreadable, because size is represented in 1K-blocks. Lets try to make it clean and more readable:

df -h

Filesystem            Size  Used Avail Use% Mounted on
/dev/hdb2              12G  2.3G  8.9G  21% /
/dev/hdb1              99M   11M   83M  12% /boot
none                   94M     0   94M   0% /dev/shm

Now the size is represented by megabytes and gigabytes.

Comments are closed