Re: Portable unix du command

2003-11-19 Thread R. Joseph Newton
david wrote: > Dan Muey wrote: > > try Filesys::DiskFree > > #!/usr/bin/perl -w > use strict; > > use Filesys::DiskFree; > > my $h = Filesys::DiskFree->new; > > $h->df; > $h->device('/usr'); > > print "/usr has ",$h->avail('/usr')," bytes available\n"; > > __END__ > > prints: > > /usr has

RE: Portable unix du command

2003-11-18 Thread Dan Muey
> Dan Muey wrote: > > > > Thanks. What I really want to do is avoid system commands > completely. > > I could always traverse the directory adding the size of each file > > together and do that all in Perl with no system commands > but I figured > > there'd already be a Module or something li

RE: Portable unix du command

2003-11-18 Thread Bob Showalter
Dan Muey wrote: > Howdy group. > > I have a need to get the size of a directory. > I could just execute unix's du command (my $sz = `du -sh /usr`;) > but was wondering if there's a better way to do it that is > more portable. > I looked on cpan but didn't see anythign that jumped out at me. There

RE: Portable unix du command

2003-11-18 Thread david
Dan Muey wrote: > >> On Tuesday, Nov 18, 2003, at 09:20 US/Pacific, Dan Muey wrote: >> >> > Howdy group. >> > >> > I have a need to get the size of a directory. >> > I could just execute unix's du command (my $sz = `du -sh >> /usr`;) but >> > was wondering if there's a better way to do it that i

Re: Portable unix du command

2003-11-18 Thread drieux
On Tuesday, Nov 18, 2003, at 09:35 US/Pacific, Dan Muey wrote: [..] Thanks. What I really want to do is avoid system commands completely. I could always traverse the directory adding the size of each file together and do that all in Perl with no system commands but I figured there'd already be a Mo

Re: Portable unix du command

2003-11-18 Thread John W. Krahn
Dan Muey wrote: > > Thanks. What I really want to do is avoid system commands completely. > I could always traverse the directory adding the size of each file > together and do that all in Perl with no system commands but I figured > there'd already be a Module or something like this, so I want to

RE: Portable unix du command

2003-11-18 Thread Dan Muey
> On Tuesday, Nov 18, 2003, at 09:20 US/Pacific, Dan Muey wrote: > > > Howdy group. > > > > I have a need to get the size of a directory. > > I could just execute unix's du command (my $sz = `du -sh > /usr`;) but > > was wondering if there's a better way to do it that is more > portable. > > I

Re: Portable unix du command

2003-11-18 Thread drieux
On Tuesday, Nov 18, 2003, at 09:20 US/Pacific, Dan Muey wrote: Howdy group. I have a need to get the size of a directory. I could just execute unix's du command (my $sz = `du -sh /usr`;) but was wondering if there's a better way to do it that is more portable. I looked on cpan but didn't see any