windows查看linux硬盘空间,Duf: Duf 是一个查看磁盘使用量及释放磁盘空间的开源软件,由 Go 语言编写而成,适配 Linux、macOS 和 Windows 操作系统...

duf

duf.svg

badge.svg

duf

gddo?status.svg

Disk Usage/Free Utility (Linux, BSD, macOS & Windows)

5fa8220334b22aea9178b662513a14bf.png

Features

User-friendly, colorful output

Adjusts to your terminal's theme & width

Sort the results according to your needs

Groups & filters devices

Can conveniently output JSON

Installation

Packages

Linux

Arch Linux: duf

Nix: nix-env -iA nixpkgs.duf

Snap: sudo snap install duf-utility (snapcraft.io)

Packages in Alpine, Debian & RPM formats

BSD

FreeBSD: pkg install duf

macOS

with Homebrew: brew install duf

with MacPorts: sudo port selfupdate && sudo port install duf

Windows

with Chocolatey: choco install duf

with scoop: scoop 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:

git clone https://github.com/muesli/duf.git

cd duf

go build

Usage

You can simply start duf without any command-line arguments:

duf

If you supply arguments, duf will only list specific devices & mount points:

duf /home /some/file

If you want to list everything (including pseudo, duplicate, inaccessible file systems):

duf --all

Filtering

You can show and hide specific tables:

duf --only local,network,fuse,special,loops,binds

duf --hide local,network,fuse,special,loops,binds

You can also show and hide specific filesystems:

duf --only-fs tmpfs,vfat

duf --hide-fs tmpfs,vfat

...or specific mount points:

duf --only-mp /,/home,/dev

duf --hide-mp /,/home,/dev

Wildcards inside quotes work:

duf --only-mp '/sys/*,/dev/*'

Display options

Sort the output:

duf --sort size

Valid keys are: mountpoint, size, used, avail, usage, inodes,

inodes_used, inodes_avail, inodes_usage, type, filesystem.

Show or hide specific columns:

duf --output mountpoint,size,usage

Valid keys are: mountpoint, size, used, avail, usage, inodes,

inodes_used, inodes_avail, inodes_usage, type, filesystem.

List inode information instead of block usage:

duf --inodes

If duf doesn't detect your terminal's colors correctly, you can set a theme:

duf --theme light

Bonus

If you prefer your output as JSON:

duf --json

Troubleshooting

Users of oh-my-zsh should be aware that it already defines an alias called

duf, which you will have to remove in order to use duf:

unalias duf

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值