[GH-ISSUE #171] Filter by file type/extension #74

Closed
opened 2026-06-08 11:25:34 +03:00 by zhus · 8 comments
Owner

Originally created by @polarathene on GitHub (Aug 10, 2021).
Original GitHub issue: https://github.com/bootandy/dust/issues/171

I often find support for exclude/ignore, but these tools seem to lack the opposite of allowing to only care about certain extensions (eg images png|gif|jpg|jpeg|webp or archives zip|tar|rar|7zip|zstd). Such functionality would be quite handy for me to get a better perspective of content breakdown for a server with user uploaded content.

Identifying how much disk usage a particular image type is using, or what the largest N images are. CLI tools like this one all seem to have the capability of doing such, but when the scanned content is not as well organized, or spread out among dirs where sibling/nested dirs can contain various other content or mixed types (eg if I only want to know about png disk usage), this is problematic without the ability to filter.

Originally created by @polarathene on GitHub (Aug 10, 2021). Original GitHub issue: https://github.com/bootandy/dust/issues/171 I often find support for exclude/ignore, but these tools seem to lack the opposite of allowing to only care about certain extensions (eg images `png|gif|jpg|jpeg|webp` or archives `zip|tar|rar|7zip|zstd`). Such functionality would be quite handy for me to get a better perspective of content breakdown for a server with user uploaded content. Identifying how much disk usage a particular image type is using, or what the largest N images are. CLI tools like this one all seem to have the capability of doing such, but when the scanned content is not as well organized, or spread out among dirs where sibling/nested dirs can contain various other content or mixed types (eg if I only want to know about png disk usage), this is problematic without the ability to filter.
zhus closed this issue 2026-06-08 11:25:34 +03:00
Author
Owner

@bootandy commented on GitHub (Aug 12, 2021):

That's an interesting idea. I think it might be worth exploring. I'll look in to it.

We could group by extension type as well as a specific extension.

https://www.computerhope.com/issues/ch001789.htm
https://www.online-convert.com/file-type

<!-- gh-comment-id:897466561 --> @bootandy commented on GitHub (Aug 12, 2021): That's an interesting idea. I think it might be worth exploring. I'll look in to it. We could group by extension type as well as a specific extension. https://www.computerhope.com/issues/ch001789.htm https://www.online-convert.com/file-type
Author
Owner

@bootandy commented on GitHub (Aug 12, 2021):

Here is an experimental branch where I've added -t for listing file_types and -y for a specific file type:

https://github.com/bootandy/dust/tree/by_type2

Is this what you were hoping for?

$ target/release/dust       -y png                                                                                             [17:21:19]
  64K   ┌── media            │                                                                   ██████████████████████████████████ │  33%
  64K   │     ┌── media      │                                 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████████████████████████████ │  33%
  64K   │   ┌─┴ du-dust-0.6.1│                                 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████████████████████████████ │  33%
  64K   │   │ ┌── media      │                                 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████████████████████████████ │  33%
  64K   │   ├─┴ du-dust-0.6.2│                                 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████████████████████████████ │  33%
 128K   │ ┌─┴ package        │                                 ████████████████████████████████████████████████████████████████████ │  67%
 128K   ├─┴ target           │                                 ████████████████████████████████████████████████████████████████████ │  67%
 192K ┌─┴ .                  │█████████████████████████████████████████████████████████████████████████████████████████████████████ │ 100%
 

$ target/release/dust       -t                                                                                                 [17:21:26]
  32K   ┌── (others)      │                                                                                                       █ │   0%
  12K   ├── .md           │                                                                                                       █ │   0%
  12K   ├── .ps1          │                                                                                                       █ │   0%
  12K   ├── .toml         │                                                                                                       █ │   0%
  12K   ├── .txt          │                                                                                                       █ │   0%
  36K   ├── .sh           │                                                                                                       █ │   0%
  44K   ├── .idx          │                                                                                                       █ │   0%
  48K   ├── .lock         │                                                                                                       █ │   0%
  48K   ├── .yml          │                                                                                                       █ │   0%
  52K   ├── .sample       │                                                                                                       █ │   0%
 176K   ├── .crate        │                                                                                                       █ │   0%
 176K   ├── .ll           │                                                                                                       █ │   0%
 192K   ├── .png          │                                                                                                       █ │   0%
 280K   ├── .rs           │                                                                                                       █ │   0%
 416K   ├── .pack         │                                                                                                       █ │   0%
 2.5M   ├── .timestamp    │                                                                                                       █ │   0%
 2.5M   ├── .json         │                                                                                                       █ │   0%
 3.3M   ├── .d            │                                                                                                       █ │   0%
  30M   ├── .so           │                                                                                                      ██ │   2%
  32M   ├── .o            │                                                                                                     ███ │   2%
  52M   ├── .bin          │                                                                                                    ████ │   3%
 238M   ├── .rmeta        │                                                                                         ███████████████ │  14%
 584M   ├── .rlib         │                                                                   █████████████████████████████████████ │  35%
 729M   ├── (no extension)│                                                          ██████████████████████████████████████████████ │  43%
 1.6G ┌─┴ (total)         │████████████████████████████████████████████████████████████████████████████████████████████████████████ │ 100%
 

<!-- gh-comment-id:897782484 --> @bootandy commented on GitHub (Aug 12, 2021): Here is an experimental branch where I've added -t for listing file_types and -y for a specific file type: https://github.com/bootandy/dust/tree/by_type2 Is this what you were hoping for? ``` $ target/release/dust -y png [17:21:19] 64K ┌── media │ ██████████████████████████████████ │ 33% 64K │ ┌── media │ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████████████████████████████ │ 33% 64K │ ┌─┴ du-dust-0.6.1│ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████████████████████████████ │ 33% 64K │ │ ┌── media │ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████████████████████████████ │ 33% 64K │ ├─┴ du-dust-0.6.2│ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████████████████████████████ │ 33% 128K │ ┌─┴ package │ ████████████████████████████████████████████████████████████████████ │ 67% 128K ├─┴ target │ ████████████████████████████████████████████████████████████████████ │ 67% 192K ┌─┴ . │█████████████████████████████████████████████████████████████████████████████████████████████████████ │ 100% $ target/release/dust -t [17:21:26] 32K ┌── (others) │ █ │ 0% 12K ├── .md │ █ │ 0% 12K ├── .ps1 │ █ │ 0% 12K ├── .toml │ █ │ 0% 12K ├── .txt │ █ │ 0% 36K ├── .sh │ █ │ 0% 44K ├── .idx │ █ │ 0% 48K ├── .lock │ █ │ 0% 48K ├── .yml │ █ │ 0% 52K ├── .sample │ █ │ 0% 176K ├── .crate │ █ │ 0% 176K ├── .ll │ █ │ 0% 192K ├── .png │ █ │ 0% 280K ├── .rs │ █ │ 0% 416K ├── .pack │ █ │ 0% 2.5M ├── .timestamp │ █ │ 0% 2.5M ├── .json │ █ │ 0% 3.3M ├── .d │ █ │ 0% 30M ├── .so │ ██ │ 2% 32M ├── .o │ ███ │ 2% 52M ├── .bin │ ████ │ 3% 238M ├── .rmeta │ ███████████████ │ 14% 584M ├── .rlib │ █████████████████████████████████████ │ 35% 729M ├── (no extension)│ ██████████████████████████████████████████████ │ 43% 1.6G ┌─┴ (total) │████████████████████████████████████████████████████████████████████████████████████████████████████████ │ 100% ```
Author
Owner

@polarathene commented on GitHub (Aug 13, 2021):

Example output from server

Using -t -r is a decent breakdown by extension.

 223G └─┬ (total)         │█████████████████████████████████████████████████████████████████████████████████████████ │ 100%
  94G   ├── .zip          │                                                   ██████████████████████████████████████ │  42%
  78G   ├── .rar          │                                                         ████████████████████████████████ │  35%
  15G   ├── .png          │                                                                                  ███████ │   7%
  14G   ├── .7z           │                                                                                   ██████ │   7%
  11G   ├── .jpg          │                                                                                    █████ │   5%
 4.8G   ├── .pdmod        │                                                                                       ██ │   2%
 2.3G   ├── .gif          │                                                                                        █ │   1%
 331M   ├── .attach       │                                                                                        █ │   0%
 237M   ├── .webp         │                                                                                        █ │   0%
 127M   ├── .unitypackage │                                                                                        █ │   0%
  75M   ├── .jpeg         │                                                                                        █ │   0%
  28M   ├── .php          │                                                                                        █ │   0%
  18M   ├── .psd          │                                                                                        █ │   0%
 5.3M   ├── .js           │                                                                                        █ │   0%
 4.7M   ├── .JPG          │                                                                                        █ │   0%
 4.5M   ├── .json         │                                                                                        █ │   0%
 4.4M   ├── (no extension)│                                                                                        █ │   0%
 4.0M   ├── .css          │                                                                                        █ │   0%
 2.6M   ├── .svg          │                                                                                        █ │   0%
 1.9M   ├── .map          │                                                                                        █ │   0%
 1.9M   ├── .jfif         │                                                                                        █ │   0%
 1.3M   ├── .txt          │                                                                                        █ │   0%
 816K   ├── .yaml         │                                                                                        █ │   0%
 800K   ├── .html         │                                                                                        █ │   0%
 696K   ├── .twig         │                                                                                        █ │   0%
 688K   ├── .ttf          │                                                                                        █ │   0%
 588K   ├── .rst          │                                                                                        █ │   0%
 556K   ├── .eot          │                                                                                        █ │   0%
 524K   ├── .apng         │                                                                                        █ │   0%
 484K   ├── .pdf          │                                                                                        █ │   0%
 468K   ├── .docx         │                                                                                        █ │   0%
 396K   ├── .md           │                                                                                        █ │   0%
 376K   ├── .woff2        │                                                                                        █ │   0%
 328K   ├── .yml          │                                                                                        █ │   0%
 256K   ├── .woff         │                                                                                        █ │   0%
 224K   ├── .htm          │                                                                                        █ │   0%
 1.0M   └── (others)      │                                                                                        █ │   0%

This is on one of the websites the server manages with -y png -r:

  15G └─┬ modworkshop        │██████████████████████████████████████████████████████████████████████████████████████ │ 100%
  15G   ├─┬ mydownloads      │ █████████████████████████████████████████████████████████████████████████████████████ │  98%
  15G   │ ├─┬ previews       │ █████████████████████████████████████████████████████████████████████████████████████ │  98%
  69M   │ │ └── fileimages   │ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█ │   0%
  18M   │ ├── downloads      │ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │   0%
 4.7M   │ └── images         │ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │   0%
 238M   ├─┬ uploads          │                                                                                    ██ │   2%
 222M   │ ├── banners        │                                                                                    ██ │   1%
  15M   │ ├── avatars        │                                                                                    ░█ │   0%
  80K   │ └── 202008         │                                                                                    ░█ │   0%
 2.5M   ├─┬ images           │                                                                                     █ │   0%
 240K   │ ├── smilies        │                                                                                     █ │   0%
 172K   │ ├── posticons      │                                                                                     █ │   0%
 120K   │ ├── colors         │                                                                                     █ │   0%
 116K   │ └── icons          │                                                                                     █ │   0%
 2.4M   ├─┬ fileupload       │                                                                                     █ │   0%
 2.4M   │ └─┬ images         │                                                                                     █ │   0%
 172K   │   ├── posticons    │                                                                                     █ │   0%
 160K   │   ├── smilies      │                                                                                     █ │   0%
 120K   │   ├── colors       │                                                                                     █ │   0%
 116K   │   └── icons        │                                                                                     █ │   0%
 264K   ├─┬ jscripts         │                                                                                     █ │   0%
 176K   │ └─┬ sceditor       │                                                                                     █ │   0%
 160K   │   └─┬ editor_themes│                                                                                     █ │   0%
 140K   │     └── emoticons  │                                                                                     █ │   0%
 228K   ├─┬ admin            │                                                                                     █ │   0%
 136K   │ ├─┬ styles         │                                                                                     █ │   0%
 136K   │ │ └─┬ default      │                                                                                     █ │   0%
 136K   │ │   └─┬ images     │                                                                                     █ │   0%
 100K   │ │     └── icons    │                                                                                     █ │   0%
  92K   │ └─┬ jscripts       │                                                                                     █ │   0%
  92K   │   └─┬ jqueryui     │                                                                                     █ │   0%
  92K   │     └─┬ css        │                                                                                     █ │   0%
  92K   │       └─┬ redmond  │                                                                                     █ │   0%
  92K   │         └── images │                                                                                     █ │   0%
  68K   └─┬ mws              │                                                                                     █ │   0%
  68K     └── assets         │                                                                                     █ │   0%

-y webp -r:

 237M └─┬ modworkshop   │███████████████████████████████████████████████████████████████████████████████████████████ │ 100%
 224M   ├─┬ mydownloads │    ███████████████████████████████████████████████████████████████████████████████████████ │  95%
 224M   │ ├── previews  │    ░██████████████████████████████████████████████████████████████████████████████████████ │  94%
 148K   │ └── images    │    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │   0%
  12M   ├─┬ uploads     │                                                                                      █████ │   5%
  12M   │ ├── banners   │                                                                                      █████ │   5%
 440K   │ └── avatars   │                                                                                      ░░░░█ │   0%
  12K   ├─┬ mws         │                                                                                          █ │   0%
  12K   │ └─┬ assets    │                                                                                          █ │   0%
  12K   │   └── images  │                                                                                          █ │   0%
  12K   └─┬ jscripts    │                                                                                          █ │   0%
  12K     └─┬ mws       │                                                                                          █ │   0%
  12K       └─┬ assets  │                                                                                          █ │   0%
  12K         └── images│                                                                                          █ │   0%

-y jpg -r:

  11G └─┬ modworkshop     │█████████████████████████████████████████████████████████████████████████████████████████ │ 100%
  11G   ├─┬ mydownloads   │ ████████████████████████████████████████████████████████████████████████████████████████ │  99%
  11G   │ ├─┬ previews    │ ████████████████████████████████████████████████████████████████████████████████████████ │  99%
  33M   │ │ └── fileimages│ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█ │   0%
  11M   │ ├── downloads   │ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │   0%
 3.6M   │ └── images      │ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │   0%
 138M   ├─┬ uploads       │                                                                                       ██ │   1%
 125M   │ ├── banners     │                                                                                       ░█ │   1%
  12M   │ ├── avatars     │                                                                                       ░█ │   0%
 120K   │ ├── 201507      │                                                                                       ░█ │   0%
  84K   │ ├── 201506      │                                                                                       ░█ │   0%
  56K   │ ├── 201508      │                                                                                       ░█ │   0%
  48K   │ ├── 201601      │                                                                                       ░█ │   0%
  36K   │ ├── 201704      │                                                                                       ░█ │   0%
  32K   │ ├── 201609      │                                                                                       ░█ │   0%
  28K   │ ├── 201702      │                                                                                       ░█ │   0%
  28K   │ ├── 201604      │                                                                                       ░█ │   0%
  28K   │ ├── 201512      │                                                                                       ░█ │   0%
  24K   │ ├── 201608      │                                                                                       ░█ │   0%
  24K   │ ├── 201607      │                                                                                       ░█ │   0%
  20K   │ ├── 202102      │                                                                                       ░█ │   0%
  20K   │ ├── 201602      │                                                                                       ░█ │   0%
  20K   │ ├── 201509      │                                                                                       ░█ │   0%
  16K   │ ├── 202011      │                                                                                       ░█ │   0%
  16K   │ ├── 202003      │                                                                                       ░█ │   0%
  16K   │ ├── 201511      │                                                                                       ░█ │   0%
  12K   │ ├── 201801      │                                                                                       ░█ │   0%
  12K   │ ├── 201711      │                                                                                       ░█ │   0%
  12K   │ ├── 201710      │                                                                                       ░█ │   0%
  12K   │ ├── 201703      │                                                                                       ░█ │   0%
  12K   │ ├── 201701      │                                                                                       ░█ │   0%
  12K   │ ├── 201611      │                                                                                       ░█ │   0%
  12K   │ ├── 201610      │                                                                                       ░█ │   0%
  12K   │ └── 201505      │                                                                                       ░█ │   0%
 388K   ├─┬ fileupload    │                                                                                        █ │   0%
 388K   │ └── images      │                                                                                        █ │   0%
 372K   └── images        │                                                                                        █ │   0%

It also works nicely for getting a file count by extension, eg -y png -fr:

31,033 └─┬ modworkshop        │█████████████████████████████████████████████████████████████████████████████████████ │ 100%
29,709   ├─┬ mydownloads      │   ██████████████████████████████████████████████████████████████████████████████████ │  96%
29,465   │ ├─┬ previews       │   ░█████████████████████████████████████████████████████████████████████████████████ │  95%
281      │ │ └── fileimages   │   ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█ │   1%
240      │ └── downloads      │   ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │   1%
701      ├─┬ uploads          │                                                                                   ██ │   2%
330      │ ├── avatars        │                                                                                   ░█ │   1%
268      │ └── banners        │                                                                                   ░█ │   1%
270      ├─┬ images           │                                                                                    █ │   1%
53       │ ├─┬ smilies        │                                                                                    █ │   0%
16       │ │ └── steam        │                                                                                    █ │   0%
43       │ ├── posticons      │                                                                                    █ │   0%
30       │ ├── colors         │                                                                                    █ │   0%
29       │ ├── icons          │                                                                                    █ │   0%
14       │ └── attachtypes    │                                                                                    █ │   0%
246      ├─┬ fileupload       │                                                                                    █ │   1%
246      │ └─┬ images         │                                                                                    █ │   1%
43       │   ├── posticons    │                                                                                    █ │   0%
33       │   ├─┬ smilies      │                                                                                    █ │   0%
16       │   │ └── steam      │                                                                                    █ │   0%
30       │   ├── colors       │                                                                                    █ │   0%
29       │   ├── icons        │                                                                                    █ │   0%
14       │   └── attachtypes  │                                                                                    █ │   0%
50       ├─┬ jscripts         │                                                                                    █ │   0%
41       │ └─┬ sceditor       │                                                                                    █ │   0%
38       │   └─┬ editor_themes│                                                                                    █ │   0%
35       │     └── emoticons  │                                                                                    █ │   0%
46       └─┬ admin            │                                                                                    █ │   0%
31         ├─┬ styles         │                                                                                    █ │   0%
31         │ └─┬ default      │                                                                                    █ │   0%
31         │   └─┬ images     │                                                                                    █ │   0%
25         │     └── icons    │                                                                                    █ │   0%
15         └─┬ jscripts       │                                                                                    █ │   0%
15           └─┬ jqueryui     │                                                                                    █ │   0%
15             └─┬ css        │                                                                                    █ │   0%
15               └─┬ redmond  │                                                                                    █ │   0%
15                 └── images │                                                                                    █ │   0%

Likewise with -t -fr I get a nice summary by extension:

137,890 └─┬ (total)         │███████████████████████████████████████████████████████████████████████████████████████ │ 100%
77,108    ├── .jpg          │                                      █████████████████████████████████████████████████ │  56%
31,033    ├── .png          │                                                                   ████████████████████ │  23%
9,726     ├── .zip          │                                                                                ███████ │   7%
7,300     ├── .rar          │                                                                                  █████ │   5%
3,708     ├── .php          │                                                                                    ███ │   3%
2,788     ├── .webp         │                                                                                     ██ │   2%
1,489     ├── .7z           │                                                                                      █ │   1%
1,391     ├── .gif          │                                                                                      █ │   1%
641       ├── .pdmod        │                                                                                      █ │   0%
423       ├── .css          │                                                                                      █ │   0%
395       ├── .jpeg         │                                                                                      █ │   0%
376       ├── .attach       │                                                                                      █ │   0%
233       ├── .html         │                                                                                      █ │   0%
195       ├── .js           │                                                                                      █ │   0%
185       ├── .txt          │                                                                                      █ │   0%
145       ├── .twig         │                                                                                      █ │   0%
119       ├── .yaml         │                                                                                      █ │   0%
118       ├── .rst          │                                                                                      █ │   0%
73        ├── .yml          │                                                                                      █ │   0%
69        ├── .md           │                                                                                      █ │   0%
69        ├── (no extension)│                                                                                      █ │   0%
66        ├── .json         │                                                                                      █ │   0%
54        ├── .xml          │                                                                                      █ │   0%
42        ├── .jfif         │                                                                                      █ │   0%
30        ├── .map          │                                                                                      █ │   0%
14        ├── .expected     │                                                                                      █ │   0%
11        ├── .svg          │                                                                                      █ │   0%
11        ├── .dist         │                                                                                      █ │   0%
8         ├── .unitypackage │                                                                                      █ │   0%
6         ├── .psd          │                                                                                      █ │   0%
6         ├── .PNG          │                                                                                      █ │   0%
6         ├── .JPG          │                                                                                      █ │   0%
5         ├── .xsd          │                                                                                      █ │   0%
5         ├── .ttf          │                                                                                      █ │   0%
5         ├── .htm          │                                                                                      █ │   0%
4         ├── .woff2        │                                                                                      █ │   0%
33        └── (others)      │                                                                                      █ │   0%

This is already very handy, thanks! 😀

However it would be nice to have something in-between supporting multiple extensions such as only the image data shown above -y "png jpg webp", -y "png,jpg,webp" or -y "\.(png|jpg|webp)$" (regex pattern on file extension). That way I can get an overview of the image data without individually querying each one and comparing/summing. As you can see there is some sizable archives in the mix which is why I requested the feature so I can focus on the image stats (as a whole and individually).

I've used dutree in the past, it had a handy --aggr=50M feature to aggregate files in directories that were 50M total or more, otherwise they were ignored, such as those smaller lines that aren't as useful when interested in the bigger numbers. dutree also could show me the top N largest files, I'm not sure if dust offers that.


This is great though, especially -y! If you do consider the mult-extension case, being able to still breakdown by extension like -t does but mixed with the aggregated dirs view -y offers would be cool too 👍

Something like below?:

  26G └─┬ modworkshop   │███████████████████████████████████████████████████████████████████████████████████████████ │ 100%
  15G   │   ├── .png    │                                                                                    ███████ │   7%
  11G   │   ├── .jpg    │                                                                                      █████ │   5%
 238M   │   └── .webp   │                                                                                          █ │   0%
  26G   ├─┬ mydownloads │    ███████████████████████████████████████████████████████████████████████████████████████ │  95%
  15G   │ │  ├── .png   │                                                                                    ███████ │   7%
  11G   │ │  ├── .jpg   │                                                                                      █████ │   5%
 238M   │ │  └── .webp  │                                                                                          █ │   0%
  26G   │ ├── previews  │    ░██████████████████████████████████████████████████████████████████████████████████████ │  94%
  15G   │ │  ├── .png   │                                                                                    ███████ │   7%
  11G   │ │  ├── .jpg   │                                                                                      █████ │   5%
 238M   │ │  └── .webp  │                                                                                          █ │   0%
 8.5M   │ └── images    │    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │   0%
 388M   ├─┬ uploads     │                                                                                      █████ │   5%
 348M   │ ├── banners   │                                                                                      █████ │   5%
  27M   │ └── avatars   │                                                                                      ░░░░█ │   0%

or if the size column would be better without the extension size interleaved..:

  26G └─┬ modworkshop   │███████████████████████████████████████████████████████████████████████████████████████████ │ 100%
        │   15G .png    │                                                                                    ███████ │   7%
        │   11G .jpg    │                                                                                      █████ │   5%
        │  238M .webp   │                                                                                          █ │   0%
  26G   ├─┬ mydownloads │    ███████████████████████████████████████████████████████████████████████████████████████ │  95%
        │ │  15G .png   │                                                                                    ███████ │   7%
        │ │  11G .jpg   │                                                                                      █████ │   5%
        │ │ 238M .webp  │                                                                                          █ │   0%
  26G   │ ├── previews  │    ░██████████████████████████████████████████████████████████████████████████████████████ │  94%
        │ │  15G .png   │                                                                                    ███████ │   7%
        │ │  11G .jpg   │                                                                                      █████ │   5%
        │ │ 238M .webp  │                                                                                          █ │   0%
 8.5M   │ └── images    │    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │   0%
 388M   ├─┬ uploads     │                                                                                      █████ │   5%
 348M   │ ├── banners   │                                                                                      █████ │   5%
  27M   │ └── avatars   │                                                                                      ░░░░█ │   0%

or as I believe dust is doing, collapse/avoid displaying size info that's not changing/useful:

  26G └─┬ modworkshop   │███████████████████████████████████████████████████████████████████████████████████████████ │ 100%
  26G   ├─┬ mydownloads │    ███████████████████████████████████████████████████████████████████████████████████████ │  95%
  26G   │ ├── previews  │    ░██████████████████████████████████████████████████████████████████████████████████████ │  94%
        │ │  15G .png   │                                                                                    ███████ │   7%
        │ │  11G .jpg   │                                                                                      █████ │   5%
        │ │ 238M .webp  │                                                                                          █ │   0%
 8.5M   │ └── images    │    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │   0%
 388M   ├─┬ uploads     │                                                                                      █████ │   5%
 348M   │ ├── banners   │                                                                                      █████ │   5%
  27M   │ └── avatars   │                                                                                      ░░░░█ │   0%

This seems to be easier to make sense of, although I haven't merged all the other dirs (and percentage is of course wrong). Being able to aggregate or exclude directories with a size lower than N may help filter out some noise from such a view if that became an issue.

<!-- gh-comment-id:898058537 --> @polarathene commented on GitHub (Aug 13, 2021): <details> <summary>Example output from server</summary> Using `-t -r` is a decent breakdown by extension. ``` 223G └─┬ (total) │█████████████████████████████████████████████████████████████████████████████████████████ │ 100% 94G ├── .zip │ ██████████████████████████████████████ │ 42% 78G ├── .rar │ ████████████████████████████████ │ 35% 15G ├── .png │ ███████ │ 7% 14G ├── .7z │ ██████ │ 7% 11G ├── .jpg │ █████ │ 5% 4.8G ├── .pdmod │ ██ │ 2% 2.3G ├── .gif │ █ │ 1% 331M ├── .attach │ █ │ 0% 237M ├── .webp │ █ │ 0% 127M ├── .unitypackage │ █ │ 0% 75M ├── .jpeg │ █ │ 0% 28M ├── .php │ █ │ 0% 18M ├── .psd │ █ │ 0% 5.3M ├── .js │ █ │ 0% 4.7M ├── .JPG │ █ │ 0% 4.5M ├── .json │ █ │ 0% 4.4M ├── (no extension)│ █ │ 0% 4.0M ├── .css │ █ │ 0% 2.6M ├── .svg │ █ │ 0% 1.9M ├── .map │ █ │ 0% 1.9M ├── .jfif │ █ │ 0% 1.3M ├── .txt │ █ │ 0% 816K ├── .yaml │ █ │ 0% 800K ├── .html │ █ │ 0% 696K ├── .twig │ █ │ 0% 688K ├── .ttf │ █ │ 0% 588K ├── .rst │ █ │ 0% 556K ├── .eot │ █ │ 0% 524K ├── .apng │ █ │ 0% 484K ├── .pdf │ █ │ 0% 468K ├── .docx │ █ │ 0% 396K ├── .md │ █ │ 0% 376K ├── .woff2 │ █ │ 0% 328K ├── .yml │ █ │ 0% 256K ├── .woff │ █ │ 0% 224K ├── .htm │ █ │ 0% 1.0M └── (others) │ █ │ 0% ``` This is on one of the websites the server manages with `-y png -r`: ``` 15G └─┬ modworkshop │██████████████████████████████████████████████████████████████████████████████████████ │ 100% 15G ├─┬ mydownloads │ █████████████████████████████████████████████████████████████████████████████████████ │ 98% 15G │ ├─┬ previews │ █████████████████████████████████████████████████████████████████████████████████████ │ 98% 69M │ │ └── fileimages │ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█ │ 0% 18M │ ├── downloads │ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │ 0% 4.7M │ └── images │ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │ 0% 238M ├─┬ uploads │ ██ │ 2% 222M │ ├── banners │ ██ │ 1% 15M │ ├── avatars │ ░█ │ 0% 80K │ └── 202008 │ ░█ │ 0% 2.5M ├─┬ images │ █ │ 0% 240K │ ├── smilies │ █ │ 0% 172K │ ├── posticons │ █ │ 0% 120K │ ├── colors │ █ │ 0% 116K │ └── icons │ █ │ 0% 2.4M ├─┬ fileupload │ █ │ 0% 2.4M │ └─┬ images │ █ │ 0% 172K │ ├── posticons │ █ │ 0% 160K │ ├── smilies │ █ │ 0% 120K │ ├── colors │ █ │ 0% 116K │ └── icons │ █ │ 0% 264K ├─┬ jscripts │ █ │ 0% 176K │ └─┬ sceditor │ █ │ 0% 160K │ └─┬ editor_themes│ █ │ 0% 140K │ └── emoticons │ █ │ 0% 228K ├─┬ admin │ █ │ 0% 136K │ ├─┬ styles │ █ │ 0% 136K │ │ └─┬ default │ █ │ 0% 136K │ │ └─┬ images │ █ │ 0% 100K │ │ └── icons │ █ │ 0% 92K │ └─┬ jscripts │ █ │ 0% 92K │ └─┬ jqueryui │ █ │ 0% 92K │ └─┬ css │ █ │ 0% 92K │ └─┬ redmond │ █ │ 0% 92K │ └── images │ █ │ 0% 68K └─┬ mws │ █ │ 0% 68K └── assets │ █ │ 0% ``` `-y webp -r`: ``` 237M └─┬ modworkshop │███████████████████████████████████████████████████████████████████████████████████████████ │ 100% 224M ├─┬ mydownloads │ ███████████████████████████████████████████████████████████████████████████████████████ │ 95% 224M │ ├── previews │ ░██████████████████████████████████████████████████████████████████████████████████████ │ 94% 148K │ └── images │ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │ 0% 12M ├─┬ uploads │ █████ │ 5% 12M │ ├── banners │ █████ │ 5% 440K │ └── avatars │ ░░░░█ │ 0% 12K ├─┬ mws │ █ │ 0% 12K │ └─┬ assets │ █ │ 0% 12K │ └── images │ █ │ 0% 12K └─┬ jscripts │ █ │ 0% 12K └─┬ mws │ █ │ 0% 12K └─┬ assets │ █ │ 0% 12K └── images│ █ │ 0% ``` `-y jpg -r`: ``` 11G └─┬ modworkshop │█████████████████████████████████████████████████████████████████████████████████████████ │ 100% 11G ├─┬ mydownloads │ ████████████████████████████████████████████████████████████████████████████████████████ │ 99% 11G │ ├─┬ previews │ ████████████████████████████████████████████████████████████████████████████████████████ │ 99% 33M │ │ └── fileimages│ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█ │ 0% 11M │ ├── downloads │ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │ 0% 3.6M │ └── images │ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │ 0% 138M ├─┬ uploads │ ██ │ 1% 125M │ ├── banners │ ░█ │ 1% 12M │ ├── avatars │ ░█ │ 0% 120K │ ├── 201507 │ ░█ │ 0% 84K │ ├── 201506 │ ░█ │ 0% 56K │ ├── 201508 │ ░█ │ 0% 48K │ ├── 201601 │ ░█ │ 0% 36K │ ├── 201704 │ ░█ │ 0% 32K │ ├── 201609 │ ░█ │ 0% 28K │ ├── 201702 │ ░█ │ 0% 28K │ ├── 201604 │ ░█ │ 0% 28K │ ├── 201512 │ ░█ │ 0% 24K │ ├── 201608 │ ░█ │ 0% 24K │ ├── 201607 │ ░█ │ 0% 20K │ ├── 202102 │ ░█ │ 0% 20K │ ├── 201602 │ ░█ │ 0% 20K │ ├── 201509 │ ░█ │ 0% 16K │ ├── 202011 │ ░█ │ 0% 16K │ ├── 202003 │ ░█ │ 0% 16K │ ├── 201511 │ ░█ │ 0% 12K │ ├── 201801 │ ░█ │ 0% 12K │ ├── 201711 │ ░█ │ 0% 12K │ ├── 201710 │ ░█ │ 0% 12K │ ├── 201703 │ ░█ │ 0% 12K │ ├── 201701 │ ░█ │ 0% 12K │ ├── 201611 │ ░█ │ 0% 12K │ ├── 201610 │ ░█ │ 0% 12K │ └── 201505 │ ░█ │ 0% 388K ├─┬ fileupload │ █ │ 0% 388K │ └── images │ █ │ 0% 372K └── images │ █ │ 0% ``` It also works nicely for getting a file count by extension, eg `-y png -fr`: ``` 31,033 └─┬ modworkshop │█████████████████████████████████████████████████████████████████████████████████████ │ 100% 29,709 ├─┬ mydownloads │ ██████████████████████████████████████████████████████████████████████████████████ │ 96% 29,465 │ ├─┬ previews │ ░█████████████████████████████████████████████████████████████████████████████████ │ 95% 281 │ │ └── fileimages │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█ │ 1% 240 │ └── downloads │ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │ 1% 701 ├─┬ uploads │ ██ │ 2% 330 │ ├── avatars │ ░█ │ 1% 268 │ └── banners │ ░█ │ 1% 270 ├─┬ images │ █ │ 1% 53 │ ├─┬ smilies │ █ │ 0% 16 │ │ └── steam │ █ │ 0% 43 │ ├── posticons │ █ │ 0% 30 │ ├── colors │ █ │ 0% 29 │ ├── icons │ █ │ 0% 14 │ └── attachtypes │ █ │ 0% 246 ├─┬ fileupload │ █ │ 1% 246 │ └─┬ images │ █ │ 1% 43 │ ├── posticons │ █ │ 0% 33 │ ├─┬ smilies │ █ │ 0% 16 │ │ └── steam │ █ │ 0% 30 │ ├── colors │ █ │ 0% 29 │ ├── icons │ █ │ 0% 14 │ └── attachtypes │ █ │ 0% 50 ├─┬ jscripts │ █ │ 0% 41 │ └─┬ sceditor │ █ │ 0% 38 │ └─┬ editor_themes│ █ │ 0% 35 │ └── emoticons │ █ │ 0% 46 └─┬ admin │ █ │ 0% 31 ├─┬ styles │ █ │ 0% 31 │ └─┬ default │ █ │ 0% 31 │ └─┬ images │ █ │ 0% 25 │ └── icons │ █ │ 0% 15 └─┬ jscripts │ █ │ 0% 15 └─┬ jqueryui │ █ │ 0% 15 └─┬ css │ █ │ 0% 15 └─┬ redmond │ █ │ 0% 15 └── images │ █ │ 0% ``` Likewise with `-t -fr` I get a nice summary by extension: ``` 137,890 └─┬ (total) │███████████████████████████████████████████████████████████████████████████████████████ │ 100% 77,108 ├── .jpg │ █████████████████████████████████████████████████ │ 56% 31,033 ├── .png │ ████████████████████ │ 23% 9,726 ├── .zip │ ███████ │ 7% 7,300 ├── .rar │ █████ │ 5% 3,708 ├── .php │ ███ │ 3% 2,788 ├── .webp │ ██ │ 2% 1,489 ├── .7z │ █ │ 1% 1,391 ├── .gif │ █ │ 1% 641 ├── .pdmod │ █ │ 0% 423 ├── .css │ █ │ 0% 395 ├── .jpeg │ █ │ 0% 376 ├── .attach │ █ │ 0% 233 ├── .html │ █ │ 0% 195 ├── .js │ █ │ 0% 185 ├── .txt │ █ │ 0% 145 ├── .twig │ █ │ 0% 119 ├── .yaml │ █ │ 0% 118 ├── .rst │ █ │ 0% 73 ├── .yml │ █ │ 0% 69 ├── .md │ █ │ 0% 69 ├── (no extension)│ █ │ 0% 66 ├── .json │ █ │ 0% 54 ├── .xml │ █ │ 0% 42 ├── .jfif │ █ │ 0% 30 ├── .map │ █ │ 0% 14 ├── .expected │ █ │ 0% 11 ├── .svg │ █ │ 0% 11 ├── .dist │ █ │ 0% 8 ├── .unitypackage │ █ │ 0% 6 ├── .psd │ █ │ 0% 6 ├── .PNG │ █ │ 0% 6 ├── .JPG │ █ │ 0% 5 ├── .xsd │ █ │ 0% 5 ├── .ttf │ █ │ 0% 5 ├── .htm │ █ │ 0% 4 ├── .woff2 │ █ │ 0% 33 └── (others) │ █ │ 0% ``` </details> --- This is already very handy, thanks! :grinning: However it would be nice to have something in-between supporting multiple extensions such as only the image data shown above `-y "png jpg webp"`, `-y "png,jpg,webp"` or `-y "\.(png|jpg|webp)$"` (regex pattern on file extension). That way I can get an overview of the image data without individually querying each one and comparing/summing. As you can see there is some sizable archives in the mix which is why I requested the feature so I can focus on the image stats (as a whole and individually). I've used `dutree` in the past, it had a handy `--aggr=50M` feature to aggregate files in directories that were 50M total or more, otherwise they were ignored, such as those smaller lines that aren't as useful when interested in the bigger numbers. `dutree` also could show me the top N largest files, I'm not sure if `dust` offers that. --- This is great though, especially `-y`! If you do consider the mult-extension case, being able to still breakdown by extension like `-t` does but mixed with the aggregated dirs view `-y` offers would be cool too :+1: Something like below?: ``` 26G └─┬ modworkshop │███████████████████████████████████████████████████████████████████████████████████████████ │ 100% 15G │ ├── .png │ ███████ │ 7% 11G │ ├── .jpg │ █████ │ 5% 238M │ └── .webp │ █ │ 0% 26G ├─┬ mydownloads │ ███████████████████████████████████████████████████████████████████████████████████████ │ 95% 15G │ │ ├── .png │ ███████ │ 7% 11G │ │ ├── .jpg │ █████ │ 5% 238M │ │ └── .webp │ █ │ 0% 26G │ ├── previews │ ░██████████████████████████████████████████████████████████████████████████████████████ │ 94% 15G │ │ ├── .png │ ███████ │ 7% 11G │ │ ├── .jpg │ █████ │ 5% 238M │ │ └── .webp │ █ │ 0% 8.5M │ └── images │ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │ 0% 388M ├─┬ uploads │ █████ │ 5% 348M │ ├── banners │ █████ │ 5% 27M │ └── avatars │ ░░░░█ │ 0% ``` or if the size column would be better without the extension size interleaved..: ``` 26G └─┬ modworkshop │███████████████████████████████████████████████████████████████████████████████████████████ │ 100% │ 15G .png │ ███████ │ 7% │ 11G .jpg │ █████ │ 5% │ 238M .webp │ █ │ 0% 26G ├─┬ mydownloads │ ███████████████████████████████████████████████████████████████████████████████████████ │ 95% │ │ 15G .png │ ███████ │ 7% │ │ 11G .jpg │ █████ │ 5% │ │ 238M .webp │ █ │ 0% 26G │ ├── previews │ ░██████████████████████████████████████████████████████████████████████████████████████ │ 94% │ │ 15G .png │ ███████ │ 7% │ │ 11G .jpg │ █████ │ 5% │ │ 238M .webp │ █ │ 0% 8.5M │ └── images │ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │ 0% 388M ├─┬ uploads │ █████ │ 5% 348M │ ├── banners │ █████ │ 5% 27M │ └── avatars │ ░░░░█ │ 0% ``` or as I believe `dust` is doing, collapse/avoid displaying size info that's not changing/useful: ``` 26G └─┬ modworkshop │███████████████████████████████████████████████████████████████████████████████████████████ │ 100% 26G ├─┬ mydownloads │ ███████████████████████████████████████████████████████████████████████████████████████ │ 95% 26G │ ├── previews │ ░██████████████████████████████████████████████████████████████████████████████████████ │ 94% │ │ 15G .png │ ███████ │ 7% │ │ 11G .jpg │ █████ │ 5% │ │ 238M .webp │ █ │ 0% 8.5M │ └── images │ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ │ 0% 388M ├─┬ uploads │ █████ │ 5% 348M │ ├── banners │ █████ │ 5% 27M │ └── avatars │ ░░░░█ │ 0% ``` This seems to be easier to make sense of, although I haven't merged all the other dirs (and percentage is of course wrong). Being able to aggregate or exclude directories with a size lower than N may help filter out some noise from such a view if that became an issue.
Author
Owner

@bootandy commented on GitHub (Aug 13, 2021):

Instead of -y "png,jpg,webp" this should work -y png -y jpg, -y ebp

But I think I need to support comma and space separated strings as well - like you suggest.

--aggr is an interesting idea, I'm not sure if that fits with dust as dust displays 'n' lines where as dutree displays all the lines. So you can think of it as dust has an implicit --aggr based on how big your terminal is, if you don't want aggr use dust -n 9999

I think interleaving the size column into the tree might be difficult.

<!-- gh-comment-id:898294029 --> @bootandy commented on GitHub (Aug 13, 2021): Instead of `-y "png,jpg,webp"` this should work `-y png -y jpg, -y ebp` But I think I need to support comma and space separated strings as well - like you suggest. `--aggr` is an interesting idea, I'm not sure if that fits with dust as dust displays 'n' lines where as dutree displays all the lines. So you can think of it as dust has an implicit --aggr based on how big your terminal is, if you don't want aggr use `dust -n 9999` I think interleaving the size column into the tree might be difficult.
Author
Owner

@polarathene commented on GitHub (Aug 13, 2021):

But I think I need to support comma and space separated strings as well - like you suggest.

That would be a better UX for sure! :)

Thanks for the tip, very useful.

I'm not sure if that fits with dust as dust displays 'n' lines where as dutree displays all the lines.

That's fine, for the most part I mentioned it as a way to filter out information that may not be of interest. In dutree that meant collapsing/grouping nested data below the limit.

For dust perhaps it'd make more sense to hide anything below a given size. I don't know if that is a feature that is as useful to others, it's probably most useful for keeping the focus on larger file content, especially with the filtered extensions if they were presented with their respective sizes like in my last response.

I think interleaving the size column into the tree might be difficult.

I'm not too concerned on location, I just went with an example that came to mind :) up to you if it adds value to the feature of course.

You could present the extensions with size .png (15G), .jpg (11G), .webp (238M) or similar format along the percentage bar column rows. That keeps the height as-is, assuming you can invert the text based on a cell being filled or not by the percentage bar overlaying the text.

Adding a new column could work too, either on the same row or multi-row.

<!-- gh-comment-id:898407455 --> @polarathene commented on GitHub (Aug 13, 2021): > But I think I need to support comma and space separated strings as well - like you suggest. That would be a better UX for sure! :) Thanks for the tip, very useful. > I'm not sure if that fits with dust as dust displays 'n' lines where as dutree displays all the lines. That's fine, for the most part I mentioned it as a way to filter out information that may not be of interest. In `dutree` that meant collapsing/grouping nested data below the limit. For `dust` perhaps it'd make more sense to hide anything below a given size. I don't know if that is a feature that is as useful to others, it's probably most useful for keeping the focus on larger file content, especially with the filtered extensions if they were presented with their respective sizes like in my last response. > I think interleaving the size column into the tree might be difficult. I'm not too concerned on location, I just went with an example that came to mind :) up to you if it adds value to the feature of course. You could present the extensions with size `.png (15G), .jpg (11G), .webp (238M)` or similar format along the percentage bar column rows. That keeps the height as-is, assuming you can invert the text based on a cell being filled or not by the percentage bar overlaying the text. Adding a new column could work too, either on the same row or multi-row.
Author
Owner

@MatthieuBizien commented on GitHub (Sep 1, 2021):

I was looking for that exact issue 😀

This feature may be even more useful if it accepts an arbitrary pattern as a filter, eg. dust --filter "*/images/*.png" would filter the png files in the images subfolders.

<!-- gh-comment-id:910077584 --> @MatthieuBizien commented on GitHub (Sep 1, 2021): I was looking for that exact issue 😀 This feature may be even more useful if it accepts an arbitrary pattern as a filter, eg. `dust --filter "*/images/*.png"` would filter the png files in the images subfolders.
Author
Owner

@bootandy commented on GitHub (Sep 2, 2021):

So @MatthieuBizien in that example dust would only build a tree for files that match the filter ? So only png files in a folder called images ?

<!-- gh-comment-id:911358673 --> @bootandy commented on GitHub (Sep 2, 2021): So @MatthieuBizien in that example dust would only build a tree for files that match the filter ? So only png files in a folder called images ?
Author
Owner

@bootandy commented on GitHub (Sep 19, 2021):

shipped with version 0.7

<!-- gh-comment-id:922461574 --> @bootandy commented on GitHub (Sep 19, 2021): shipped with version 0.7
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#74