[GH-ISSUE #161] Ignore directories is...unintutive #70

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

Originally created by @Yohe-Am on GitHub (Jul 22, 2021).
Original GitHub issue: https://github.com/bootandy/dust/issues/161

Using the following command as the following works properly.

/🔒
❯ dust -d 1 /etc -X /etc/ssh/                                                                                                                  05:07:08
Did not have permissions for all directories
   0B   ┌── .pwd.lock                            │                                                                                             █ │   0%
   0B   ├── motd                                 │                                                                                             █ │   0%
   0B   ├── mtab                                 │                                                                                             █ │   0%
 4.0K   ├── .updated                             │                                                                                             █ │   0%
 4.0K   ├── adjtime                              │                                                                                             █ │   0%
 4.0K   ├── anacrontab                           │                                                                                             █ │   0%
 4.0K   ├── arch-release                         │                                                                                             █ │   0%
 4.0K   ├── bash.bash_logout                     │                                                                                             █ │   0%
 4.0K   ├── bash.bashrc                          │                                                                                             █ │   0%
 4.0K   ├── bindresvport.blacklist               │                                                                                             █ │   0%
 4.0K   ├── binfmt.d                             │                                                                                             █ │   0%
...
...
more stuff

But a little change in the input strings and it goes awry.

/🔒
❯ dust -d 1 etc -X /etc/ssh/                                                                                                                   05:09:03
Did not have permissions for all directories
 572K   ┌── ssh  │                                                                                                                      ████████ │   6%
 9.4M   ├── etc  │       ███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ │  94%
10.0M ┌─┴ (total)│██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ │ 100%

I'm not exactly sure what's going on here but it's acting as if I'm passing it multiple paths to check as opposed to ignoring the latter. Look...

/🔒
❯ dust -d 1 etc -X /tmp/                                                                                                                       05:10:53
Did not have permissions for all directories
 9.4M   ┌── etc  │                                                                                                         █████████████████████ │  16%
  49M   ├── tmp  │                    ██████████████████████████████████████████████████████████████████████████████████████████████████████████ │  84%
  58M ┌─┴ (total)│██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ │ 100%

/🔒
❯ dust -d 1 etc  /tmp/                                                                                                                         05:10:55
Did not have permissions for all directories
 9.5M   ┌── etc  │                                                                                                         █████████████████████ │  16%
  49M   ├── tmp  │                    ██████████████████████████████████████████████████████████████████████████████████████████████████████████ │  84%
  58M ┌─┴ (total)│██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ │ 100%

It doesn't support multiple ignores either so would be great if this area got a rework.

/etc🔒
❯ dust -d 1 -X ssh ssl                                                                                                                         05:18:15
 4.0K   ┌── ct_log_list.cnf     │                                                                                                              █ │   0%
 4.0K   ├── ct_log_list.cnf.dist│                                                                                                              █ │   0%
 4.0K   ├── private             │                                                                                                              █ │   0%
  12K   ├── openssl.cnf         │                                                                                                             ██ │   1%
  12K   ├── openssl.cnf.dist    │                                                                                                             ██ │   1%
  20K   ├── misc                │                                                                                                            ███ │   2%
 196K   ├── cert.pem            │                                                                                       ████████████████████████ │  21%
 684K   ├── certs               │                              █████████████████████████████████████████████████████████████████████████████████ │  73%
 940K ┌─┴ ssl                   │███████████████████████████████████████████████████████████████████████████████████████████████████████████████ │ 100%
Originally created by @Yohe-Am on GitHub (Jul 22, 2021). Original GitHub issue: https://github.com/bootandy/dust/issues/161 Using the following command as the following works properly. ```fish /🔒 ❯ dust -d 1 /etc -X /etc/ssh/ 05:07:08 Did not have permissions for all directories 0B ┌── .pwd.lock │ █ │ 0% 0B ├── motd │ █ │ 0% 0B ├── mtab │ █ │ 0% 4.0K ├── .updated │ █ │ 0% 4.0K ├── adjtime │ █ │ 0% 4.0K ├── anacrontab │ █ │ 0% 4.0K ├── arch-release │ █ │ 0% 4.0K ├── bash.bash_logout │ █ │ 0% 4.0K ├── bash.bashrc │ █ │ 0% 4.0K ├── bindresvport.blacklist │ █ │ 0% 4.0K ├── binfmt.d │ █ │ 0% ... ... more stuff ``` But a little change in the input strings and it goes awry. ```fish /🔒 ❯ dust -d 1 etc -X /etc/ssh/ 05:09:03 Did not have permissions for all directories 572K ┌── ssh │ ████████ │ 6% 9.4M ├── etc │ ███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ │ 94% 10.0M ┌─┴ (total)│██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ │ 100% ``` I'm not exactly sure what's going on here but it's acting as if I'm passing it multiple paths to check as opposed to ignoring the latter. Look... ```fish /🔒 ❯ dust -d 1 etc -X /tmp/ 05:10:53 Did not have permissions for all directories 9.4M ┌── etc │ █████████████████████ │ 16% 49M ├── tmp │ ██████████████████████████████████████████████████████████████████████████████████████████████████████████ │ 84% 58M ┌─┴ (total)│██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ │ 100% /🔒 ❯ dust -d 1 etc /tmp/ 05:10:55 Did not have permissions for all directories 9.5M ┌── etc │ █████████████████████ │ 16% 49M ├── tmp │ ██████████████████████████████████████████████████████████████████████████████████████████████████████████ │ 84% 58M ┌─┴ (total)│██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ │ 100% ``` It doesn't support multiple ignores either so would be great if this area got a rework. ``` /etc🔒 ❯ dust -d 1 -X ssh ssl 05:18:15 4.0K ┌── ct_log_list.cnf │ █ │ 0% 4.0K ├── ct_log_list.cnf.dist│ █ │ 0% 4.0K ├── private │ █ │ 0% 12K ├── openssl.cnf │ ██ │ 1% 12K ├── openssl.cnf.dist │ ██ │ 1% 20K ├── misc │ ███ │ 2% 196K ├── cert.pem │ ████████████████████████ │ 21% 684K ├── certs │ █████████████████████████████████████████████████████████████████████████████████ │ 73% 940K ┌─┴ ssl │███████████████████████████████████████████████████████████████████████████████████████████████████████████████ │ 100% ```
zhus closed this issue 2026-06-08 11:25:33 +03:00
Author
Owner

@bootandy commented on GitHub (Jul 23, 2021):

I'm not exactly sure what's going on here but it's acting as if I'm passing it multiple paths to check as opposed to ignoring the latter. Look...

Yes that's what it is doing.

dust -d 1 etc -X /etc/ssh/
Means run dust with the -d 1 flag on the directories called etc, -X, /etc/ssh

This is how the clap argument parser works. It's not something I can change easily and I'm not keen on changing it.

It does work with multiple arguments but you have to include the '-X' each time like this:
target/release/dust -X ssl -X fonts /etc

Thanks,

<!-- gh-comment-id:885680740 --> @bootandy commented on GitHub (Jul 23, 2021): > I'm not exactly sure what's going on here but it's acting as if I'm passing it multiple paths to check as opposed to ignoring the latter. Look... Yes that's what it is doing. ` dust -d 1 etc -X /etc/ssh/ ` Means run dust with the `-d 1` flag on the directories called `etc, -X, /etc/ssh` This is how the clap argument parser works. It's not something I can change easily and I'm not keen on changing it. It does work with multiple arguments but you have to include the '-X' each time like this: `target/release/dust -X ssl -X fonts /etc ` Thanks,
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#70