Unix/Linux : How to find out the hard disk size?
It is easy to find out the available or used up hard disk space in a Graphical User Interface environment such as MacOSX or KDE. However, it is not so easy to find out the available or used up hard disk space in terminal or command line. Since I work mostly with ssh shell and vi, I need to find out the hard disk usage information with command line application.
How to find out the used and available hard disk size in Unix/Linux OS terminal?
Use the df -h
command.
df -f
Sample output :
guest@porteus:~$ df -h
Filesystem Size Used Avail Use% Mounted on
aufs 2.3G 205M 2.1G 9% /
devtmpfs 1.9G 20M 1.9G 1% /dev
/dev/sda1 100M 25M 76M 25% /mnt/sda1
/dev/sda2 298G 43G 256G 15% /mnt/sda2
/dev/sdb1 7.3G 1.7G 5.7G 23% /mnt/sdb1
/mnt/live/run 1.9G 176M 1.8G 10% /run
See also : Unix/Linux : How to archive and compress entire directory ?
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+20.4k Golang : Convert seconds to human readable time format example
+6.9k Golang : Find the longest line of text example
+5.4k PHP : Hide PHP version information from curl
+5.8k Golang : Detect words using using consecutive letters in a given string
+25.4k Golang : Storing cookies in http.CookieJar example
+25.3k Golang : Create PDF file from HTML file
+7.9k Gogland : Where to put source code files in package directory for rookie
+21.3k Golang : For loop continue,break and range
+5.8k Javascript : How to refresh page with JQuery ?
+9.7k Android Studio : Indicate progression with ProgressBar example
+7.1k Nginx : Password protect a directory/folder
+19.8k Golang : Set or Add HTTP Request Headers