[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12312: Feature Request: du -h or du --si sort by human readable valu
From: |
Eric Blake |
Subject: |
bug#12312: Feature Request: du -h or du --si sort by human readable value |
Date: |
Thu, 30 Aug 2012 13:20:32 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
tag 12312 notabug
thanks
On 08/30/2012 11:39 AM, kat amsterdam wrote:
> Hi GNU core utility developers:
>
> First of all thank you very much for developing the software that we have
> come to rely on. It's well appreciated!
Thank you.
>
> I have a feature request based on a question that was asked on askubuntu.com
>
> the question is: why does du -h not sort by the human readable value.
du(1) doesn't sort, you use sort(1) for sorting.
> 1) du returns random sort order
> *du -h /home/user/Photos*
to get it in sorted order,
du -h /home/user/Photos* | sort -k1,1h
> 2) du returns sorted by number but not by acutal value in this example G is
> large than M and M is larger than K
> *du -h /home/user/Photos | sort -n *
Don't use sort -n, use sort -h.
>
> Please add a sorting function to du -h and du --si to sort the human
> readable values to make your wonderful utility even more useful.
>
We already have: sort -h, in coreutils 7.5 (2009). Therefore, I'm
closing this bug.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature