I'd like to see my disk usage using ncdu on / but exclude anything in /home/
and /media/
. But my command ncdu / --exclude /home/ --exclude /media/
still scans those dirs.
1 Answer
When you omit the slashes from the paths, it should work:
ncdu / --exclude home --exclude media
the documentation says about --exclude:
Exclude files that match PATTERN. The files will still be displayed
by default, but are not counted towards the disk usage statistics.
The pattern is about the name and not about the path.
-
thx! So that means if I have subdirs with a certain name that reoccurs in other places they will all be left out since I can not give a path?– FelixJul 8, 2020 at 11:05
-
that's how I understand the manpage. I tried it by creating /tmp/home with files in it. Indeed this directory is excluded by ncdu as well.– ruudJul 8, 2020 at 11:14