Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: size of directory

by zentara (Archbishop)
on Oct 10, 2002 at 15:23 UTC ( #204201=note: print w/replies, xml ) Need Help??


in reply to size of directory

Here's a dirsize method using File::Find.
#!/usr/bin/perl -w use File::Find; use strict; my $total = 0; my $dir = $ARGV[0] || '.'; find sub {$total += -s $_;},$dir; my $megs = sprintf "%5.2f",($total/(1024*1024)); print "Total size of files in $dir:$megs Mbytes\n";

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2018-10-17 23:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...














    Results (99 votes). Check out past polls.

    Notices?