[GH-ISSUE #50] Add an option to skip directories on other filesystems #24

Closed
opened 2026-06-08 11:25:20 +03:00 by zhus · 1 comment
Owner

Originally created by @kpine on GitHub (Jan 11, 2020).
Original GitHub issue: https://github.com/bootandy/dust/issues/50

Consider adding an -x option, which is available in both du and ncdu. The option would exclude any directories that reside on other filesystems. This is useful when you want to find what directories are taking all the space on a particular filesystem, but have network or other disks mounted in other directories.

For example, ncdu -x from the root directory will show this on my system:

ncdu 1.13 ~ Use the arrow keys to navigate, press ? for help
--- / ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   38.2 GiB [##########] /var
   35.4 GiB [######### ] /home
    4.4 GiB [#         ] /nix
    4.4 GiB [#         ] /usr
...
    4.0 KiB [          ] /mnt
...

With dust it shows:

$ dust -d1
 277G ─┬ .
 192G  ├── mnt
  40G  ├── var
  35G  ├── home
 4.4G  ├── nix
 4.4G  ├── usr
...

/mnt has a CIFS shared mounted from a NAS, so it throws off the totals.

#46 is related, but would be less convenient to use if there were other filesystems mounted in various locations.

Originally created by @kpine on GitHub (Jan 11, 2020). Original GitHub issue: https://github.com/bootandy/dust/issues/50 Consider adding an `-x` option, which is available in both `du` and `ncdu`. The option would exclude any directories that reside on other filesystems. This is useful when you want to find what directories are taking all the space on a particular filesystem, but have network or other disks mounted in other directories. For example, `ncdu -x` from the root directory will show this on my system: ``` ncdu 1.13 ~ Use the arrow keys to navigate, press ? for help --- / --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 38.2 GiB [##########] /var 35.4 GiB [######### ] /home 4.4 GiB [# ] /nix 4.4 GiB [# ] /usr ... 4.0 KiB [ ] /mnt ... ``` With dust it shows: ``` $ dust -d1 277G ─┬ . 192G ├── mnt 40G ├── var 35G ├── home 4.4G ├── nix 4.4G ├── usr ... ``` `/mnt` has a CIFS shared mounted from a NAS, so it throws off the totals. #46 is related, but would be less convenient to use if there were other filesystems mounted in various locations.
zhus closed this issue 2026-06-08 11:25:20 +03:00
Author
Owner

@bootandy commented on GitHub (Jan 11, 2020):

good suggestion, I'll add it to the todo list and should probably do #46 at the same time.

<!-- gh-comment-id:573300800 --> @bootandy commented on GitHub (Jan 11, 2020): good suggestion, I'll add it to the todo list and should probably do #46 at the same time.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#24