English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Linux df command (English full name: disk free) is used to display the disk usage statistics of the file system on the Linux system.
df [options]... [FILE]...
Displays the disk usage statistics of the file system:
# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda6 29640780 4320704 23814388 16% / udev 1536756 4 1536752 1% /dev tmpfs 617620 888 616732 1% /run none 5120 0 5120 0% /run/lock none 1544044 156 1543888 1% /run/shm
The first column specifies the name of the file system, and the second column specifies a particular file system1K-block1K is1024Total memory in bytes. The and available columns specify the amount of memory being used and available, respectively.
Specify the percentage of memory used by the column, while the last column "mounted on" specifies the mount point of the file system.
df can also display filesystem information about disk usage:
# df test Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda6 29640780 4320600 23814492 16% /
With a-The df command with the i option displays inode information instead of block usage.
df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda6 1884160 261964 1622196 14% / udev 212748 560 212188 1% /dev tmpfs 216392 477 215915 1% /run none 216392 3 216389 1% /run/lock none 216392 8 216384 1% /run/shm
Display all information:
# df --total Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda6 29640780 4320720 23814372 16% / udev 1536756 4 1536752 1% /dev tmpfs 617620 892 616728 1% /run none 5120 0 5120 0% /run/lock none 1544044 156 1543888 1% /run/shm total 33344320 4321772 27516860 14%
We see that the end of the output includes an additional line that shows the total of each column.
-The h option, through which it can produce a readable format of the df command output:
# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda6 29G 4.2G 23G 16% / udev 1.5G 4.0K 1.5G 1% /dev tmpfs 604M 892K 603M 1% /run none 5.0M 0 5.0M 0% /run/lock none 1.5G 156K 1.5G 1% /run/shm
We can see that the output displays numbers in the form of 'G' (gigabytes), 'M' (megabytes), and 'K' (kilobytes).
This makes the output easy to read and understand, making it readable. Note that the names in the second column have also changed to make the display "size" readable.