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

Re: What's eating all your disk space?

by chanio (Priest)
on Aug 18, 2005 at 21:49 UTC ( [id://484968]=note: print w/replies, xml ) Need Help??


in reply to What's eating all your disk space?

I want to thank you all for these valuable pieces of code. All the page is very useful.

Perhaps, it could help others if I show the way I used it. (based on the main node)

##[ my_df.sh ]## chdir ~ du -sk . * .* | perl -e ' ## ADDED .files $sum=<>; while (<>) { ($size, $inode) =split; $inode .= "/" if (-d $inode); ## /_SHOW SIZE IN Kb + GRAPHIC: _\ printf("%25s | %4d Kb |%6.2f%% [%+11s]\n",$inode,int($size/1024),$ +size/$sum*100,"<".("=" x (int($size/$sum*10)))) unless ($inode=~/\.\. +/); ## EVERY LINE LOOKS LIKE THIS: ## Documents/ | 710 Kb | 52.20% [ <=====] }'| sort -rn -k 3 | head | xmessage -center -file -
The output would show in an xmessage screen (come on, burn me). But it could work well with a TK one, as well as with the full perl way of doing it all, who doubts that :) .

{ \ ( ' v ' ) / }
( \ _ / ) _ _ _ _ ` ( ) ' _ _ _ _
( = ( ^ Y ^ ) = ( _ _ ^ ^ ^ ^
_ _ _ _ \ _ ( m _ _ _ m ) _ _ _ _ _ _ _ _ _ ) c h i a n o , a l b e r t o
Wherever I lay my KNOPPIX disk, a new FREE LINUX nation could be established

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://484968]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-28 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found