[GH-ISSUE #480] outputting progress indicator to stderr if stdout is redirected to a file #213

Closed
opened 2026-06-08 11:26:09 +03:00 by zhus · 6 comments
Owner

Originally created by @xinehc on GitHub (Mar 29, 2025).
Original GitHub issue: https://github.com/bootandy/dust/issues/480

Hi,

The progress indicator is very helpful for scanning large folders but is disabled if the stdout is redirected to a file (https://github.com/bootandy/dust/issues/342).

Maybe instead of disabling it outputting it to stderr? or adding an option for switching?

echo -e "Disk usage generated at `date -u` \n `dust -D -r`" 1> DISK_DETAIL
Originally created by @xinehc on GitHub (Mar 29, 2025). Original GitHub issue: https://github.com/bootandy/dust/issues/480 Hi, The progress indicator is very helpful for scanning large folders but is disabled if the stdout is redirected to a file (https://github.com/bootandy/dust/issues/342). Maybe instead of disabling it outputting it to stderr? or adding an option for switching? ``` echo -e "Disk usage generated at `date -u` \n `dust -D -r`" 1> DISK_DETAIL ```
zhus closed this issue 2026-06-08 11:26:09 +03:00
Author
Owner

@bootandy commented on GitHub (Mar 30, 2025):

-P, --no-progress Disable the progress indication.

Although ideally it should auto-detect this using:
https://crates.io/crates/atty
https://doc.rust-lang.org/std/io/trait.IsTerminal.html (preferred)

so I'm leaving this open

<!-- gh-comment-id:2764641291 --> @bootandy commented on GitHub (Mar 30, 2025): ` -P, --no-progress Disable the progress indication. ` Although ideally it should auto-detect this using: https://crates.io/crates/atty https://doc.rust-lang.org/std/io/trait.IsTerminal.html (preferred) so I'm leaving this open
Author
Owner

@HernandoR commented on GitHub (Mar 31, 2025):

tried:

dust -p -j -o GB -d 2 -T 8 /mnt/ | tee | jq | tee dust-autolabel.json

but no progress bar is showing

<!-- gh-comment-id:2764968907 --> @HernandoR commented on GitHub (Mar 31, 2025): tried: ``` dust -p -j -o GB -d 2 -T 8 /mnt/ | tee | jq | tee dust-autolabel.json ``` but no progress bar is showing
Author
Owner

@bootandy commented on GitHub (Apr 1, 2025):

Oh I see, sorry I misread your original comment. You want to send the progress bar to stderr ? Why?

<!-- gh-comment-id:2767399074 --> @bootandy commented on GitHub (Apr 1, 2025): Oh I see, sorry I misread your original comment. You want to send the progress bar to stderr ? Why?
Author
Owner

@bootandy commented on GitHub (Apr 1, 2025):

this would do that (currently considering):
https://github.com/bootandy/dust/pull/483

<!-- gh-comment-id:2767502052 --> @bootandy commented on GitHub (Apr 1, 2025): this would do that (currently considering): https://github.com/bootandy/dust/pull/483
Author
Owner

@xinehc commented on GitHub (Apr 1, 2025):

You want to send the progress bar to stderr ? Why?

I want to keep a record of each regular disk scan, but scanning large RAID may take hours so knowing the status could be helpful.

<!-- gh-comment-id:2767925596 --> @xinehc commented on GitHub (Apr 1, 2025): > You want to send the progress bar to stderr ? Why? I want to keep a record of each regular disk scan, but scanning large RAID may take hours so knowing the status could be helpful.
Author
Owner

@bootandy commented on GitHub (Apr 2, 2025):

progress bar now goes to stderr - on reflection this seems sensible. (he says hoping no one will complain with the new release :-) )

<!-- gh-comment-id:2770834358 --> @bootandy commented on GitHub (Apr 2, 2025): progress bar now goes to stderr - on reflection this seems sensible. (he says hoping no one will complain with the new release :-) )
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#213