muesli / duf

Disk Usage/Free Utility - a better 'df' alternative
Other
12.76k stars 395 forks source link

macOS – Does not hide “/System/Volumes” Mount Points #274

Open faxotherapy opened 7 months ago

faxotherapy commented 7 months ago

Using any of these options does not work on macOS:

duf --hide-mp '/System/Volumes/Data'
duf --hide-mp '/System/*'

It stills shows:

/System/Volumes/Data
/System/Volumes/Preboot
/System/Volumes/Update
/System/Volumes/VM

However, the following works…

duf --hide-mp '/'
fuchsg commented 6 months ago

It seems there is a problem on MacOS when the MP name contains capitalized letters. I have built from source and I can hide my TimeMachine MPs like so:

❯ duf --hide-mp '/dev, *com*'
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ 7 local devices                                                                                            │
├─────────────────────────┬────────┬────────┬───────┬───────────────────────────────┬───────┬────────────────┤
│ MOUNTED ON              │   SIZE │   USED │ AVAIL │              USE%             │ TYPE  │ FILESYSTEM     │
├─────────────────────────┼────────┼────────┼───────┼───────────────────────────────┼───────┼────────────────┤
│ /                       │ 465.6G │ 423.1G │ 42.5G │ [##################..]  90.9% │ apfs  │ /dev/disk1s5s1 │
│ /System/Volumes/Data    │ 465.6G │ 423.1G │ 42.5G │ [##################..]  90.9% │ apfs  │ /dev/disk1s1   │
│ /System/Volumes/Preboot │ 465.6G │ 423.1G │ 42.5G │ [##################..]  90.9% │ apfs  │ /dev/disk1s2   │
│ /System/Volumes/Update  │ 465.6G │ 423.1G │ 42.5G │ [##################..]  90.9% │ apfs  │ /dev/disk1s6   │
│ /System/Volumes/VM      │ 465.6G │ 423.1G │ 42.5G │ [##################..]  90.9% │ apfs  │ /dev/disk1s4   │
│ /Volumes/Crucial X8     │   3.6T │ 899.8G │  2.8T │ [####................]  24.2% │ apfs  │ /dev/disk3s2   │
│ /Volumes/SDCard 64      │  59.4G │  26.0G │ 33.5G │ [########............]  43.7% │ exfat │ /dev/disk4s1   │
╰─────────────────────────┴────────┴────────┴───────┴───────────────────────────────┴───────┴────────────────╯

Note that I cannot use pattern *TimeMachine* or *timemachine* as both patterns won't hide the MPs. However, *com* and *apple*, respectively, are working.

But if I want to hide the /System MPs, using /System/* or *System* still yields all MP as shown above. Nothing is hidden.

❯ duf --hide-mp '/dev, *com*, *System*'
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ 7 local devices                                                                                            │
├─────────────────────────┬────────┬────────┬───────┬───────────────────────────────┬───────┬────────────────┤
│ MOUNTED ON              │   SIZE │   USED │ AVAIL │              USE%             │ TYPE  │ FILESYSTEM     │
├─────────────────────────┼────────┼────────┼───────┼───────────────────────────────┼───────┼────────────────┤
│ /                       │ 465.6G │ 423.1G │ 42.5G │ [##################..]  90.9% │ apfs  │ /dev/disk1s5s1 │
│ /System/Volumes/Data    │ 465.6G │ 423.1G │ 42.5G │ [##################..]  90.9% │ apfs  │ /dev/disk1s1   │
│ /System/Volumes/Preboot │ 465.6G │ 423.1G │ 42.5G │ [##################..]  90.9% │ apfs  │ /dev/disk1s2   │
│ /System/Volumes/Update  │ 465.6G │ 423.1G │ 42.5G │ [##################..]  90.9% │ apfs  │ /dev/disk1s6   │
│ /System/Volumes/VM      │ 465.6G │ 423.1G │ 42.5G │ [##################..]  90.9% │ apfs  │ /dev/disk1s4   │
│ /Volumes/Crucial X8     │   3.6T │ 899.8G │  2.8T │ [####................]  24.2% │ apfs  │ /dev/disk3s2   │
│ /Volumes/SDCard 64      │  59.4G │  26.0G │ 33.5G │ [########............]  43.7% │ exfat │ /dev/disk4s1   │
╰─────────────────────────┴────────┴────────┴───────┴───────────────────────────────┴───────┴────────────────╯

What works is to use *ystem* like so:

❯ duf --hide-mp '/dev, *com*, *ystem*'
╭────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ 3 local devices                                                                                        │
├─────────────────────┬────────┬────────┬───────┬───────────────────────────────┬───────┬────────────────┤
│ MOUNTED ON          │   SIZE │   USED │ AVAIL │              USE%             │ TYPE  │ FILESYSTEM     │
├─────────────────────┼────────┼────────┼───────┼───────────────────────────────┼───────┼────────────────┤
│ /                   │ 465.6G │ 423.1G │ 42.5G │ [##################..]  90.9% │ apfs  │ /dev/disk1s5s1 │
│ /Volumes/Crucial X8 │   3.6T │ 899.8G │  2.8T │ [####................]  24.2% │ apfs  │ /dev/disk3s2   │
│ /Volumes/SDCard 64  │  59.4G │  26.0G │ 33.5G │ [########............]  43.7% │ exfat │ /dev/disk4s1   │
╰─────────────────────┴────────┴────────┴───────┴───────────────────────────────┴───────┴────────────────╯

Also see #106. There may be a fix in PR #245.

IGLOU-EU commented 6 months ago

@fuchsg yep this PR will fix it, go-wildcard is now in 2.0.2 an upgrade can be nice to. But @muesli is not very active, I don't know the state of the project.

muesli commented 6 months ago

Thanks for confirming, @IGLOU-EU. See comment on #245.

IGLOU-EU commented 6 months ago

You make me lying muesli :rofl: Ok, I will update my PR, thanks.