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
+10.5k Golang : Simple Jawi(Yawi) to Rumi(Latin/Romanize) converter
+17k Golang : How to generate QR codes?
+10.3k Golang : How to get quoted string into another string?
+8.4k Golang : Check if integer is power of four example
+10.3k Golang : Bcrypting password
+5.5k Golang : Display advertisement images or strings on random order
+26.5k Golang : Get executable name behind process ID example
+10.7k Golang : Flip coin example
+14.9k Golang : Get URI segments by number and assign as variable example
+5.5k Javascript : How to loop over and parse JSON data?
+12.4k Golang : Encrypt and decrypt data with x509 crypto
+36.4k Golang : Convert date or time stamp from string to time.Time type