bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: feature request: sort by human-readable disk sizes


From: Bert Wesarg
Subject: Re: feature request: sort by human-readable disk sizes
Date: Tue, 25 Sep 2007 09:41:18 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.0


Justin Watt wrote:
> 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?
There is a patch in the savannah tracker for this:

http://savannah.gnu.org/patch/?2565

Bert

> 
> Justin Watt
> http://justinsomnia.org/
> 
> 
> _______________________________________________
> Bug-coreutils mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-coreutils
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]