How do we check the disk space left in a disk. Suppose if we have total disk space as below
[root@abc ~]# fdisk -l|grep Disk
Disk /dev/sda: 250.0 GB, 250058268160 bytes
How do we find how much is free in this 250GB disk.
You should use df -h
$ man df df - report file system disk space usage
You can add the --total
option to have the total. For example:
$ df -h --total ... ... total 135G 79G 51G 61% -
Use df -h
.This command will display the file system disk space usage.
$ df -h
The above command will display the disk size details on terminal.
For Ex:
Filesystem Size Used Avail Use% Mounted on /dev/sda 20G 14G 4.6G 76% / /dev/sda1 99M 18M 77M 19% /boot
Here the Total disk size is 20G, Used is 14G and Free is 4.6G
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With