Closed caco3 closed 7 years ago
why not make this an option? i see some benefits being able to write to stdout.
why not make this an option? i see some benefits being able to write to stdout.
@jose1711 I won't commit the proposed patch. It needs refactoring and writing to a file will be an option for sure. Firstly, because a simple redirect should be enough. Secondly, if someone really needs an output filename as a parameter, it must be an option. Sending progress information to a TTY will also be an option. I need some time to make those changes because currently I'm busy at work.
@ jose1711 AFAIK, if you send it to the stdout, you can't show any progress. Scanning my NAS took over 4 hours, so I prefer to see some progress. IMO it would be the best if one could provide an output-file name (-o parameter) like ncdu does. If needed, stdout also could be an option. I didn't implement it simply because I had no need!
Another feature which would be great is if the script also could visualize them like ncdu does. This then would be almost a python implementation of ncdu.
how about using pv
for progress visualization?
@caco3 Showing progress is possible even when redirecting. If on a TTY the stdin still holds fd to the TTY. See the recent patch.
redirect printout directly to a file (ncdu_export.json) show current file getting scanned