概述
github:https://github.com/muesli/duf
duf是一种磁盘空间占用统计工具,支持 Linux 和 MacOS。
安装
Linux
- Arch Linux: duf
- Nix:
nix-env -iA nixpkgs.duf
- Packages in Alpine, Debian & RPM formats
BSD
macOS
- macOS:
- with Homebrew:
brew tap muesli/tap && brew install duf
- with MacPorts:
sudo port selfupdate && sudo port install duf
Android
- Android (via termux):
pkg install duf
Binaries
- Binaries for Linux, FreeBSD, OpenBSD, macOS, Windows
From source
Make sure you have a working Go environment (Go 1.12 or higher is required). See the install instructions.
Compiling duf is easy, simply run:
1 2 3
| git clone https://github.com/muesli/duf.git cd duf go build
|
语法说明
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| Usage of duf: -all include pseudo, duplicate, inaccessible file systems -hide-binds hide bind mounts (default true) -hide-fs string hide specific filesystems, separated with commas -hide-fuse hide fuse devices -hide-local hide local devices -hide-loops hide loop devices (default true) -hide-network hide network devices -hide-special hide special devices -inodes list inode information instead of block usage -json output all devices in JSON format -output string output fields: mountpoint, size, used, avail, usage, inodes, inodes_used, inodes_avail, inodes_usage, type, filesystem -sort string sort output by: mountpoint, size, used, avail, usage, inodes, inodes_used, inodes_avail, inodes_usage, type, filesystem (default "mountpoint") -style string style: unicode, ascii (default "unicode") -theme string color themes: dark, light (default "dark") -version display version -width uint max output width
|
示例