df
Use the df command to display statistics about the amount of free disk space in the file system.
df
Command History
Release |
Modification |
---|---|
3.0.0 |
This command was introduced. |
Examples
This example shows how to check the disk usage of the folder /data in your file system:
root@center100:~# df -h /data/
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/data_crypt 245G 1.6G 230G 1% /data
This example calculates the disk usage of the /data/
directory, displays it in a human-readable format, and then sorts the output by size:
root@center100:~# du -sh /data/* | sort -h
4.0K /data/extensions
4.0K /data/flags
4.0K /data/updates
16K /data/lost+found
32K /data/home
64K /data/license
216K /data/redis
109M /data/log
122M /data/etc
284M /data/var
351M /data/postgresql
774M /data/tmp
For more information, see df.