Harry Putnam wrote:

I'm spending lots of time looking thru perl functions but not finding
something to give me a quick reading on the size of a directory.

How is that task handled in perl?

First of all, you can use du:


$output = `du -sk /etc`;
($kilobytes) = $output =~/^(\d+)/ or die;

There's also Tie::DiskUsage module:
http://search.cpan.org/search?module=Tie::DiskUsage

You might also take a look at du from ppt:
http://search.cpan.org/src/SDAGUE/ppt-0.12/bin/du

--
ZSDC


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to