df command

LINUX-Frequently used commands

df command Aggregate and display the size of free disk space.
Syntax
df   [Option]  [Device file name]
The df command displays disk information such as total space, used space, free space, and utilization for each partition of the hard disk called the file system.
The df command displays disk information such as total capacity, used capacity, free space, and usage rate for each partition of the hard disk called the file system.
If the device file name of the file system (a file under /dev) is specified as an argument of the df command, only information about that file system will be displayed.
If you specify the device file name of the file system (files under /dev) as the argument of the df command, only the information about that file system will be displayed.
Frequently used options
-h   Display in readable units according to size.
-h   Display in easy-to-read units. However, use a value in units of 1000 instead of 1024.
-B  <size>    Display in multiples of the specified size. The size can be specified as a number or a unit.
-k   Displays the capacity in kilobytes.
-m  Display capacity in megabytes.
-i    Display i-node information instead of block usagee
Example: Display the disk space.
$ df
Filesystem    1K-Block         Use             Usable          Use%       Mount Position
/dev/sda1     102175132     3491340      93493616     4%           /
ttmpfs           960376           0                960376         0%          /dev/shm
tmpfs            960376           0                960376         0%          /var/cache/nginx
Example: Display the capacity in the appropriate units.
$ df -h
Filesystem     Size             Used           Avail              Use%    Mounted Position
/dev/sda1    102175132    3491340     93493616       4%        /
tmpfs           960376              0           960376            0%       /dev/shm tmpfs 960376 0 960376 0% /var/cache/nginx
Example: Display capacity in easy-to-read units.
$ df -H
Filesystem           Size      Used      Avail     Capacity      Mounted on
/dev/ad0s1a        38G      17G       19G       47%          /
devfs                   1.0K     1.0K       0B        100%        /dev
procfs                  4.1K     4.1K       0B        100%        /proc
linprocfs              4.1K      4.1K       0B        100%        /usr/compat/linux/proc

Copied title and URL