perl -e'sub h{pop=~/(...)(.)/&&{M,1e3,G,1e6}->{$2}+$1}print sort{h($b)<=>h$a}`du -h`' #### perl -e'sub c{pop=~/[GMK]/;(ord$&&7).1e3+$`}print sort{c($b)<=>c$a}`du -h`'