Hi all,
I am having problems with the difference in output between du from bash and du
from Filesys::DiskUsage.
I wrote this little file to demonstrate my problem. I am very new to perl so
please forgive me if it's a silly mistake :)
file:
#!/usr/bin/perl -w
use Filesys::DiskUsage qw/du/;
system "du -sb /home/jdoe/perl";
system "du -sk /home/jdoe/perl";
$tot=du ( { 'sector-size' => 1024 } , { 'human-readable' => 1 } ,
qw/\/home\/jdoe\/perl/ );
print "\n$tot\t/home/jdoe/perl\n";
output:
7597 /home/jdoe/perl
20 /home/jdoe/perl
6144 /home/jdoe/perl
Why can I not get the same values? I have played around with:
{ 'sector-size' => 1024 }
{ 'human-readable' => 1 }
{ 'Human-readable' => 1 }
{ recursive => 1 }
... but not one of them seems to give me the same value as the one I get from
the shell.
Any help or pointers to doc are appreciated! :)
Thanks
-Ed
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/