Re: File Space Usage ... in perl ?

2000-10-23 Thread Alexander Farber (EED)

See Perl Power Tools - http://language.perl.com/ppt/what.html



Re: File Space Usage ... in perl ?

2000-10-21 Thread Christian Jaeger

See http://testwww.ethz.ch/source/my_scripts_collection/duu for a 
script of mine calculating directory sizes (it's like du but more eye 
friendly, it displays the subfolders sorted after their size). Its 
not the same thing, as it uses du to calculate the size of each 
subfolder, but I've had the same issue regarding blocks vs. bytes. du 
displays used blocks, not real sizes.

christian.



Re: File Space Usage ... in perl ?

2000-10-21 Thread Ernest Lergon

Dear Fred,

without testing it, just some ideas. Try to exchange:

To be on the safe side:

>   my $_size = -s $File::Find::name;
my $_size = -s $File::Find::fullname;

To count links in:

>   find ( $wanted, "$dir" );
find ( { wanted => $wanted, follow => 1 }, $dir );

Check out via telnet:

du /etc
du -L /etc

And the results may be different, if you are logged in as root or
if you run your program as user nobody because of access rights.

Ernest




--
Yours sincerely
Mit freundlichen Grüßen

Ernest Lergon

VIRTUALITAS
Artists online, Fine Arts online, Poets online
http://www.virtualitas.com/