Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: What's eating all your disk space?

by chanio (Priest)
on Aug 18, 2005 at 21:49 UTC ( #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


Comment on Re: What's eating all your disk space?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2014-09-03 08:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (35 votes), past polls