扫描时如何排除ncdu中的多个目录

Fel*_*lix 5 disk-usage

我想在 / 上使用 ncdu 查看磁盘使用情况,但排除/home/和中的任何内容/media/。但我的命令ncdu / --exclude /home/ --exclude /media/仍然扫描这些目录。

ruu*_*uud 3

当您省略路径中的斜杠时,它应该可以工作:

ncdu / --exclude home --exclude media
Run Code Online (Sandbox Code Playgroud)

该文档提到了 --exclude:

   Exclude files that match PATTERN. The files will still be displayed
   by default, but are not counted towards the disk usage statistics.
Run Code Online (Sandbox Code Playgroud)

该模式与名称有关,而不与路径有关。