Hey list.

I'm having a problem reading the size of a directory with recursive directories.
The problem is that du -s shows a different bytecount than my program does.


Here's my code:

#!/usr/gnu/bin/perl -w
use File::Find;
@ARGV = ('.') unless @ARGV;
my $sum = 0;
find sub { $sum += -s }, @ARGV;
print "@ARGV contains $sum bytes\n";

'du' shows a size of ~120 megabytes, while the program shows a size of something that's waaay larger.

Any idea why?

Jesper Nøhr - decius <[EMAIL PROTECTED]>
Holstebro, Denmark -- http://printf.dk
UNIX Administrator, Software Engineer, Geek.

--
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