Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to show size of sub-elements of a given folder #3

Open
jonhoo opened this issue Nov 1, 2018 · 9 comments
Open

Provide a way to show size of sub-elements of a given folder #3

jonhoo opened this issue Nov 1, 2018 · 9 comments
Labels
help wanted Extra attention is needed

Comments

@jonhoo
Copy link

jonhoo commented Nov 1, 2018

One of the most common use-cases for du -hs by far for me (and also what dust caters to), is to do du -hs * to find the largest directories in a given directory (usually the current one). It doesn't seem like diskus can currently operate in that mode? It'd be awesome if that kind of "tell me what's large" quick-n-dirty mode could be supported somehow!

@sharkdp
Copy link
Owner

sharkdp commented Nov 1, 2018

I was not planning to turn this into a full-blown replacement for du, but that is indeed also my most common use-case.

What about changing the usage to

diskus [path]...

where diskus would just show the total size of the current directory, but diskus path1 path2 would show the total size for each path? The latter could simply be used with diskus *.

@jonhoo
Copy link
Author

jonhoo commented Nov 1, 2018

That seems perfect! I think it'd also be handy for the resulting list to be sorted by size, not by the order of the arguments, but with that that's pretty much all I'd need!

@polyzen
Copy link
Contributor

polyzen commented Nov 1, 2018

Could just pipe it through sort.

@jonhoo
Copy link
Author

jonhoo commented Nov 1, 2018

@polyzen yup, you can always do that, but I'd argue that since it's by far the most common use-case, it seems reasonable for that to be the default :) That is also what dust does.

@kpcyrd
Copy link

kpcyrd commented Jan 22, 2019

I usually use du -sch * which lists the size of each file/folder and the total size of all combined. This would be really useful to have.

@sharkdp sharkdp added the help wanted Extra attention is needed label Jan 22, 2019
@joeshaw
Copy link

joeshaw commented Feb 12, 2019

I tend to use du -h -d 1 over du -sh * for this, because it only lists directories.

It is sometimes nice to use a greater depth, like when trying to track down an unknown, particularly large subdirectory. So, at the risk of feature creep, it'd be nice to have summaries of arbitrary depth.

@rNoz
Copy link

rNoz commented Mar 3, 2019

My main use case is exactly like @kpcyrd and @polyzen: per directory and file, total size of every listed file and output piped to sort -h.

@sharkdp sharkdp pinned this issue Sep 15, 2019
@sharkdp sharkdp unpinned this issue Apr 17, 2020
@mw55309
Copy link

mw55309 commented Aug 24, 2020

Hello, was this ever implemented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

8 participants
@joeshaw @jonhoo @mw55309 @polyzen @sharkdp @kpcyrd @rNoz and others