Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

du -h, sorted

by bellaire (Hermit)
on Feb 25, 2009 at 19:26 UTC ( #746356=CUFP: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    du | sort -nr
    
  2. or download this
    du -B1 | sort -nr | perl -e '@h=qw(b K M G);for(<>){($s,@f)=split/\s+/
    +;$e=3;$e-- while(1024**$e>$s);$v=($s/(1024**$e));printf "%-8s%s\n",sp
    +rintf($v>=100?"%d%s":"%.1f%s",$v,$h[$e]),@f;}'
    
  3. or download this
    du -h | perl -e 'sub h{%h=(K=>10,M=>20,G=>30);($n,$u)=shift=~/([0-9.]+
    +)(\D)/;return $n*2**$h{$u}}print sort{h($b)<=>h($a)}<>;'
    
  4. or download this
    4.4M    .
    3.6M    ./colors
    ...
    128K    ./autoload
    100K    ./syntax
    100K    ./doc
    
  5. or download this
    perl -e'%h=map{/.\s/;99**(ord$&&7)-$`,$_}`du -h`;die@h{sort%h}'
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: CUFP [id://746356]
Front-paged by grinder
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2014-09-19 13:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (138 votes), past polls