Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disk Space in Linux Server [closed]

Tags:

linux

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.

like image 609
Mohammed Selman Avatar asked Apr 17 '13 07:04

Mohammed Selman


2 Answers

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% - 
like image 55
Sandro Munda Avatar answered Sep 20 '22 05:09

Sandro Munda


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.

like image 42
MangeshBiradar Avatar answered Sep 21 '22 05:09

MangeshBiradar