It'd be great if "sort" had an option to sort by the "-h" output of
the "du" command.

For example the current output of du is alphabetized by filename with
no options to sort:

$ du -h --max-depth=1
4.0K    ./bin
52M     ./code
765M    ./Desktop
12K     ./mail
17M     ./music
124K    ./PDF
5.5G    ./photos
153M    ./public_html
652K    ./ufc
7.3G    .

What I'm envisioning is something like this:

$ du -h --max-depth=1 | sort -h
4.0K    ./bin
12K     ./mail
124K    ./PDF
652K    ./ufc
17M     ./music
52M     ./code
153M    ./public_html
765M    ./Desktop
5.5G    ./photos
7.3G    .

Seems like it'd be pretty easy and really useful. What do you think?

Justin Watt
http://justinsomnia.org/


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to