Closed luckman212 closed 2 years ago
See https://github.com/muesli/duf/issues/101 and https://github.com/muesli/duf/pull/107 which may address this.
I built the adrien/HideShow_mountPoint branch from source and tested this. It works (thanks) but doesn't support wildcards, so still doesn't really address the original issue.
A syntax like
duf -hide-mp '/Volumes/.timemachine*'
or
duf -only-mp '/System/Volumes/*'
would be ideal.
The latest build fix your request @luckman212 ?
I haven't had a chance to try it yet! Trying now.
@IGLOU-EU I built freshly from master.
So duf --hide-mp '*time*'
does work (all /Volumes/.timemachine/xxx...
are hidden).
But I also tried duf --hide-mp '/Volumes/.time*'
which does not work (nothing is hidden).
Is this expected?
Nop ... this is not expected !
I can't reproduce this bug with the latest version of the code
For me duf -only-mp '*run*'
working like expected
Can you give me the result of duf -h
EDIT:
duf --hide-mp '*time*'
= all /Volumes/.timemachine/xxx... are hidden. Expected
duf --hide-mp '/Volumes/.time*'
= nothing is hidden. Not expected
$ duf -h
Usage of duf:
-all
include pseudo, duplicate, inaccessible file systems
-hide string
hide specific devices, separated with commas:
local, network, fuse, special, loops, binds
-hide-fs string
hide specific filesystems, separated with commas
-hide-mp string
hide specific mount points, separated with commas (supports wildcards)
-inodes
list inode information instead of block usage
-json
output all devices in JSON format
-only string
show only specific devices, separated with commas:
local, network, fuse, special, loops, binds
-only-fs string
only specific filesystems, separated with commas
-only-mp string
only specific mount points, separated with commas (supports wildcards)
-output string
output fields: mountpoint, size, used, avail, usage, inodes, inodes_used, inodes_avail, inodes_usage, type, filesystem
-sort string
sort output by: mountpoint, size, used, avail, usage, inodes, inodes_used, inodes_avail, inodes_usage, type, filesystem (default "mountpoint")
-style string
style: unicode, ascii (default "unicode")
-theme string
color themes: dark, light (default "dark")
-version
display version
-warnings
output all warnings to STDERR
-width uint
max output width
I can't seem to reproduce this with v0.7.0 anymore. Has this been fixed in go-wildcard, @IGLOU-EU?
I have made a mistake in my last reply @muesli ...
go-wildcard doesn't support the dot like pattern matching. It only supports wildcard(*) and interrogation mark(?), the latter works like the classical dot(.).
But I can add it 🤔
go-wildcard doesn't support the dot like pattern matching. It only supports wildcard(*) and interrogation mark(?), the latter works like the classical dot(.).
That's fine, the dot .
shouldn't be considered a wildcard. It is however part of the directory name, and that seems to work just fine from what I can tell, e.g.: duf --hide-mp '/Volumes/.time*'
correctly hides the mount paths within /Volumes/.timemachine
.
Closing this one as I believe this is working as expected now!
I hope, I may reopen this one as there still seems to be 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 #274. There may be a fix in PR #245.
duf 0.6.0 from Homebrew
duf
produces voluminous output on my system, due to a lot of filesystems mapped by TimeMachine → SMB share on my NAS:I tried various incarnations of
-hide
,-hide-fs
,-only-fs
etc but nothing I did worked to exclude those*.timemachine
mounts. Is there any way to do this? The fs names are dynamic due to the snapshot nature of the system, so specifying them explicitly isn't really an option.