← 返回命令列表

Linux command

duf 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Show disk usage

duf

Show only local filesystems

duf --only local

Show specific mount points

duf [/] [/home]

Show all filesystems

duf --all

Hide specific filesystem types

duf --hide-fs tmpfs,devtmpfs

Output as JSON

duf --json

Sort by usage percentage

duf --sort usage

Show inodes

duf --inodes

说明

duf (Disk Usage/Free) is a modern replacement for the df command with a colorful, user-friendly terminal interface. It displays disk usage and free space for mounted filesystems in an organized table format. The tool provides a clear visual representation with color-coded usage bars, making it easy to identify nearly-full filesystems at a glance. It groups filesystems by type (local, network, special) for better organization. duf automatically handles various filesystem types and units, displaying sizes in human-readable format. It supports multiple output formats including JSON for scripting.

参数

--all
Show all filesystems including pseudo.
--only _types_
Show only specified filesystem types.
--hide _paths_
Hide specific mount points.
--hide-fs _types_
Hide specific filesystem types.
--hide-mp _paths_
Hide mount points.
--inodes
Show inode information.
--json
Output as JSON.
--output _fields_
Specify output columns.
--sort _field_
Sort by field (size, used, avail, usage, inodes, type, mountpoint).
--style _style_
Output style (unicode, ascii).
--theme _theme_
Color theme (dark, light).
--width _n_
Maximum output width.

FAQ

What is the duf command used for?

duf (Disk Usage/Free) is a modern replacement for the df command with a colorful, user-friendly terminal interface. It displays disk usage and free space for mounted filesystems in an organized table format. The tool provides a clear visual representation with color-coded usage bars, making it easy to identify nearly-full filesystems at a glance. It groups filesystems by type (local, network, special) for better organization. duf automatically handles various filesystem types and units, displaying sizes in human-readable format. It supports multiple output formats including JSON for scripting.

How do I run a basic duf example?

Run `duf` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --all do in duf?

Show all filesystems including pseudo.