mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[GH-ISSUE #312] --depth overrides default for --number-of-lines #133
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @asomers on GitHub (Feb 17, 2023).
Original GitHub issue: https://github.com/bootandy/dust/issues/312
By default, dust chooses a good value for
--number-of-lines. But if I also use--depth, then dust acts as though--number-of-linesis unlimited, and prints everything. Shouldn't it still use a reasonable number?FreeBSD 14.0-CURRENT amd64, Dust 0.8.1.
@bootandy commented on GitHub (Feb 19, 2023):
I decided that using
--depthmeant the user wanted to go see everything to that level.If
--depthassumed the default number of lines of output it could lead to strange behaviour.If you choose
--depth=1and there is one directory and two files. Should it only show 3 entries or should it open the directory and go into lower depths too?If you select
depth=3and all the big files are at depth=1 then does it only show the big files at depth=1 and not go down to show you the directory structure of the nested directories?I wrestled with the above ideas and thought that if you want a correct
--number-of-linesyou probably don't want to use--depthat all. Just run dust normally.@asomers commented on GitHub (Feb 19, 2023):
Fair enough. In my case, all of the big files are many levels down, but I only want to see the size of directories at the depth I specify. For that case, --number-of-lines makes sense.
@bootandy commented on GitHub (Feb 22, 2023):
you can run "dust dir1 dir2 dir3" and it will do one run on those 3 directories.