recently switched from a Windows server to a Linux server operating system and need Linux check disk space command. I am using Ubuntu 16.04/18.04/20.04 and CentOS 7.x/8.x server. How do I find out disk space utilization information using Linux command line option?
Linux offer the following commands to check disk space usage:
ADVERTISEMENTS
Sample outputs:
Fig.01: df command in action
You can give a device or mount point as an argument, and df report data only for the filesystem physically residing on that device. For example, the following command provides information only for the partition /dev/sda:
$ df /dev/sda
$ df -h /dev/sdc1
$ df /data/
Sample outputs:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda 2930266584 69405248 2859579472 3% /data
#linux