[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: |
kat amsterdam |
Subject: |
bug#12312: Feature Request: du -h or du --si sort by human readable value |
Date: |
Thu, 30 Aug 2012 20:39:07 +0200 |
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!
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.
Example:
1) du returns random sort order
*du -h /home/user/Photos*
156M /home/user/Photos/cats
124M /home/user/Photos/vacation
1G /home//user/Photos/family
148K /home/user/Photos/profile
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 *
1G /home//user/Photos/family
124M /home/user/Photos/vacation
148K /home/user/Photos/profile
156M /home/user/Photos/cats
3) this works partially but is very difficult to remember
du -k * | sort -nr | cut -f2 | xargs -d '\n' du -sh | head -n 10
4) This is even more ridiculous, computers are supposed to do the work for
us, not make attempt impossible memorization tasks.
alias duf='du -sk * | sort -n | perl -ne '\''($s,$f)=split(m{\t});for
(qw(K M G)) {if($s<1024) {printf("%.1f",$s);print "$_\t$f";
last};$s=$s/1024}'\'
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.
This is program one time, and it's done for everyone. The entire GNU and
linux communities will be beter for this time saving feature.
--
Met vriendelijke groet,
Damiƶn la Bagh
Amsterdam, Nederland
==
globe*one***
Point of sale solutions for Retail and Horeca
- bug#12312: Feature Request: du -h or du --si sort by human readable value,
kat amsterdam <=