首页
首页 » 磁盘管理 » df(disk free)

df(disk free)

df(disk free)
功能说明:显示磁盘的相关信息。
语  法:df [-ahHiklmPT][--block-size=<区块大小>][-t <文件系统类型>][-x <文件系统类型>][--help][--no-sync][--sync][--version][文件或设备]
补充说明:df可显示磁盘的文件系统与使用情形。
参  数:
  -a或--all   包含全部的文件系统。
  --block-size=<区块大小>   以指定的区块大小来显示区块数目。
  -h或--human-readable   以可读性较高的方式来显示信息。
  -H或--si   与-h参数相同,但在计算时是以1000 Bytes为换算单位而非1024 Bytes。
  -i或--inodes   显示inode的信息。
  -k或--kilobytes   指定区块大小为1024字节。
  -l或--local   仅显示本地端的文件系统。
  -m或--megabytes   指定区块大小为1048576字节。
  --no-sync   在取得磁盘使用信息前,不要执行sync指令,此为预设值。
  -P或--portability   使用POSIX的输出格式。
  --sync   在取得磁盘使用信息前,先执行sync指令。
  -t<文件系统类型>或--type=<文件系统类型>   仅显示指定文件系统类型的磁盘信息。
  -T或--print-type   显示文件系统的类型。
  -x<文件系统类型>或--exclude-type=<文件系统类型>   不要显示指定文件系统类型的磁盘信息。
  --help   显示帮助。
  --version   显示版本信息。
  [文件或设备]   指定磁盘设备。

df

df [options] [name]

Report the amount of free disk space available on all mounted filesystems or on the given name. (df cannot report on unmounted filesystems.) Disk space is shown in 1 KB blocks (default) or 512-byte blocks (if the environment variable POSIXLY_CORRECT is set). name can be a device name (e.g., /dev/hd*), the directory name of a mounting point (e.g., /usr), or a directory name (in which case df reports on the entire filesystem in which that directory is mounted).

Options

-a, --all

Include empty filesystems (those with 0 blocks).

--block-size=n

Show space as n-byte blocks.

-h, --human-readable

Print sizes in a format friendly to human readers (e.g., 1.9G instead of 1967156).

-H, --si

Like -h, but show as power of 1000 rather than 1024.

-i, --inodes

Report free, used, and percent-used inodes.

-k, --kilobytes

Print sizes in kilobytes.

-l, --local

Show local filesystems only.

-m, --megabytes

Print sizes in megabytes.

--no-sync

Show results without invoking sync first (i.e., without flushing the buffers). This is the default.

-P, --portability

Use POSIX output format (i.e., print information about each filesystem on exactly one line).

--sync

Invoke sync (flush buffers) before getting and showing sizes.

-t type, --type=type

Show only type filesystems.

-T, --print-type

Print the type of each filesystem in addition to the sizes.

-x type, --exclude-type=type

Show only filesystems that are not of type type.

--help

Print help message and then exit.

--version

Print the version and then exit.