命令一共有两个:
du
该命令不用安装,为系统自带,常用的命令为:
du --max-depth=1 -h
gdu
重点说一下这个,很直观。首先是安装:
Using curl:
1 2 3 |
curl -L https://github.com/dundee/gdu/releases/latest/download/gdu_linux_amd64.tgz | tar xz chmod +x gdu_linux_amd64 sudo mv gdu_linux_amd64 /usr/bin/gdu |
wget:
1 2 3 4 |
wget https://gitee.com/public_sharing/tools_link/raw/master/gdu.zip unzip gdu.zip chmod +x gdu sudo mv gdu /usr/bin/gdu |
1 2 |
yay -S gdu |
1 2 |
dpkg -i gdu_*_amd64.deb |
1 2 3 4 |
sudo add-apt-repository ppa:daniel-milde/gdu sudo apt-get update sudo apt-get install gdu |
1 2 |
nix-env -iA nixos.gdu |
1 2 3 |
brew install -f gdu brew link --overwrite gdu # if you have coreutils installed as well |
Snap:
1 2 3 4 5 |
snap install gdu-disk-usage-analyzer snap connect gdu-disk-usage-analyzer:mount-observe :mount-observe snap connect gdu-disk-usage-analyzer:system-backup :system-backup snap alias gdu-disk-usage-analyzer.gdu gdu |
1 2 |
binenv install gdu |
Go:
1 |
go get -u github.com/dundee/gdu/v5/cmd/gdu |
用法:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
gdu [flags] [directory_to_scan] Flags: -h, --help help for gdu -i, --ignore-dirs strings Absolute paths to ignore (separated by comma) (default [/proc,/dev,/sys,/run]) -I, --ignore-dirs-pattern strings Absolute path patterns to ignore (separated by comma) -l, --log-file string Path to a logfile (default "/dev/null") -m, --max-cores int Set max cores that GDU will use. 8 cores available (default 8) -c, --no-color Do not use colorized output -x, --no-cross Do not cross filesystem boundaries -H, --no-hidden Ignore hidden directories (beggining with dot) -p, --no-progress Do not show progress in non-interactive mode -n, --non-interactive Do not run in interactive mode -a, --show-apparent-size Show apparent size -d, --show-disks Show all mounted disks -v, --version Print versionl |
例子:
1 2 3 4 5 6 7 8 9 10 11 12 |
gdu # analyze current dir gdu -a # show apparent size instead of disk usage gdu <some_dir_to_analyze> # analyze given dir gdu -d # show all mounted disks gdu -l ./gdu.log <some_dir> # write errors to log file gdu -i /sys,/proc / # ignore some paths gdu -I '.*[abc]+' # ignore paths by regular pattern gdu -c / # use only white/gray/black colors gdu -n / # only print stats, do not start interactive mode gdu -np / # do not show progress, useful when using its output in a script gdu / > file # write stats to file, do not start interactive mode |
学习
学习
太需要了!謝謝!!
啊
哈哈哈
不知为何 执行 systemctl enable qbittorrent 以使 qBittorrent 开机启动,执行 systemctl start qbittorrent 以使 qBittorre
终端怎么换啊
啊啊为什么啊,我开个终端它一直加载,纯纯哭泣了