dua-cli icon indicating copy to clipboard operation
dua-cli copied to clipboard

Non-interactive tree output

Open multimeric opened this issue 1 year ago • 2 comments

By default dua some_dir reports a flat file hierarchy. However, it would be useful to generate a tree, but non-interactively. My use case is sharing a disk usage report with someone, which can't be done in interactive mode, and the current behaviour isn't informative enough.

I wonder if a --depth <int> flag could be added to the uninteractive command that allows a tree output? It should default to 1 which is the current behaviour.

multimeric avatar Sep 20 '24 03:09 multimeric

Thanks for the suggestion! It seems to me that PDU might be exactly what you want.

It's an auto-tree, essentially, and it's faster than dua as well.

However, I think the particular implementation suggested here seems like a good fit and nice to have, so let's keep it in case anyone comes along to implement it.

Byron avatar Sep 20 '24 09:09 Byron

Thanks for the recommendation. This isn't a good reason, but we use dua in our HPC facility and for admin + docs reasons, it would be easier to have one tool that does both the interactive stuff and uninteractive reporting.

multimeric avatar Sep 20 '24 14:09 multimeric