In Unix; the Perl line of code you need is:
system("/usr/bin/du -ks $directory_name");
The size is in Kilobytes and it is recursive.
I am not sure about NT.
Regards
-----Original Message-----
From: Nikko Odiseos [mailto:[EMAIL PROTECTED]]
Sent: Friday, 26 October 2001 13:03
To: [EMAIL PROTECTED]
Subject: [Perl-unix-users] Directory size
I need to determine the size of a directory with potentially hundreds of
thousand of files. Ideally needs to work on both nt and unix. Should be
easy but I am struggling. Any ideas?
Thanks,
Nikko
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users