Get full summary of disk space usage of file system on Linux system ( df )

  • Posted on: 13 June 2018
  • By: jmu

"df" command is for getting a full summary of available and used disk space usage of the file system on Linux system. "df" is stand for "disk filesystem"

1. Check File System Disk Space Usage

The "df" command displays the information of device name, total blocks, total disk space, used disk space, available disk space and mount points on a file system.

ubuntu@ip:~$ df
Filesystem     1K-blocks    Used Available Use% Mounted on
udev              499268       0    499268   0% /dev
tmpfs             101452   10708     90744  11% /run
/dev/xvda1     101584140 2768220  98799536   3% /
tmpfs             507256       0    507256   0% /dev/shm
tmpfs               5120       0      5120   0% /run/lock
tmpfs             507256       0    507256   0% /sys/fs/cgroup

2. Show Disk Space Usage in Human Readable Format

The "df" command provides an option to display sizes in Human Readable formats by using ‘-h’ 

ubuntu@ip:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            488M     0  488M   0% /dev
tmpfs           100M   11M   89M  11% /run
/dev/xvda1       97G  2.7G   95G   3% /
tmpfs           496M     0  496M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           496M     0  496M   0% /sys/fs/cgroup

Hint:

1. How could you extend the volume size on AWS EC2: https://www.youtube.com/watch?v=LqgE1igqJG0&t=195s (youtube)

English