df - report file system disk space usage - 文件系统磁盘空间使用情况
df
displays the amount of disk space available on the file system containing each file name argument. If no file name is given, the space available on all currently mounted file systems is shown. Disk space is shown in 1K blocks by default, unless the environment variable POSIXLY_CORRECT
is set, in which case 512-byte blocks are used.
df
显示包含每个文件名参数的文件系统上可用的磁盘空间量。如果未提供文件名,则会显示所有当前已挂载文件系统上的可用空间。默认情况下,磁盘空间以 1K 块显示,除非设置了环境变量 POSIXLY_CORRECT
,在这种情况下使用 512 字节块。
If an argument is the absolute file name of a disk device node containing a mounted file system, df
shows the space available on that file system rather than on the file system containing the device node.
如果参数是包含已挂载文件系统的磁盘设备节点的绝对文件名,则 df
显示该文件系统上而不是包含设备节点的文件系统上的可用空间。
Show information about the file system on which each FILE resides, or all file systems by default.
显示有关每个 FILE 所在的文件系统或默认情况下所有文件系统的信息。
Mandatory arguments to long options are mandatory for short options too.
长选项的强制性参数对于短选项也是必需的。
(base) yongqiang@yongqiang:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 109846524 72211996 37634528 66% /
none 109846524 72211996 37634528 66% /dev
none 109846524 72211996 37634528 66% /run
none 109846524 72211996 37634528 66% /run/lock
none 109846524 72211996 37634528 66% /run/shm
none 109846524 72211996 37634528 66% /run/user
C: 109846524 72211996 37634528 66% /mnt/c
D: 262143996 5712844 256431152 3% /mnt/d
E: 335544316 21217500 314326816 7% /mnt/e
F: 167772156 16833548 150938608 11% /mnt/f
(base) yongqiang@yongqiang:~$
-a, --all
include pseudo, duplicate, inaccessible file systems
(base) yongqiang@yongqiang:~$ df -a
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 109846524 76268644 33577880 70% /
none 109846524 76268644 33577880 70% /dev
sysfs 0 0 0 - /sys
proc 0 0 0 - /proc
devpts 0 0 0 - /dev/pts
none 109846524 76268644 33577880 70% /run
none 109846524 76268644 33577880 70% /run/lock
none 109846524 76268644 33577880 70% /run/shm
none 109846524 76268644 33577880 70% /run/user
binfmt_misc 0 0 0 - /proc/sys/fs/binfmt_misc
C: 109846524 76268644 33577880 70% /mnt/c
D: 262143996 5712844 256431152 3% /mnt/d
E: 335544316 21217500 314326816 7% /mnt/e
F: 167772156 16833548 150938608 11% /mnt/f
(base) yongqiang@yongqiang:~$
pseudo /ˈsuːdəʊ; ˈsjuːdəʊ/:n. 伪君子,假冒的人 adj. 冒充的,假的
-h, --human-readable
print sizes in powers of 1024 (e.g., 1023M)
1024 单位
(base) yongqiang@yongqiang:~$ df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 105G 70G 36G 67% /
none 105G 70G 36G 67% /dev
none 105G 70G 36G 67% /run
none 105G 70G 36G 67% /run/lock
none 105G 70G 36G 67% /run/shm
none 105G 70G 36G 67% /run/user
C: 105G 70G 36G 67% /mnt/c
D: 250G 5.5G 245G 3% /mnt/d
E: 320G 21G 300G 7% /mnt/e
F: 160G 17G 144G 11% /mnt/f
(base) yongqiang@yongqiang:~$
-H, --si
print sizes in powers of 1000 (e.g., 1.1G)
1000 单位
(base) yongqiang@yongqiang:~$ df -H
Filesystem Size Used Avail Use% Mounted on
rootfs 113G 75G 38G 67% /
none 113G 75G 38G 67% /dev
none 113G 75G 38G 67% /run
none 113G 75G 38G 67% /run/lock
none 113G 75G 38G 67% /run/shm
none 113G 75G 38G 67% /run/user
C: 113G 75G 38G 67% /mnt/c
D: 269G 5.9G 263G 3% /mnt/d
E: 344G 22G 322G 7% /mnt/e
F: 172G 18G 155G 11% /mnt/f
(base) yongqiang@yongqiang:~$