Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

du -h, sorted

by bellaire (Hermit)
on Feb 25, 2009 at 19:26 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 12:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found