> Okay, I'm at a loss and need help.  A friend of mine is 
> working with a 
> Perl script.  It has a system call to df in it, he would like to 
> replace with something a little more portable.

Well, looking here at the source to df on OpenBSD:
http://www.openbsd.org/cgi-bin/cvsweb/src/bin/df/df.c?rev=1.37&content-t
ype=text/x-cvsweb-markup

it looks as though it uses getmntinfo() to get information about free
space. This function call may be implemented in some perl module, or you
could be brave and use syscall() to call it. I'll work on that for kicks
and get back to the list. Your friend will have to see if this function
exists on all his unix platforms.
 
> The script is used in a 32 server environment that I know has 
> at least 
> four operating systems:  HP-UX, Solaris, Linux, and Windows.  
> I believe 
> df is pretty standard on all of those but Windows, though the options 
> vary.

On Windows, I'd use Win32::DriveInfo

> So the questions:  Is there a pure Perl way to handle a 
> df-like call?  
> Is there an equivalent program in the Windows world?  Any other tips?
> 
> I browsed the CPAN a bit, but wasn't too happy with the 
> choices there, 
> aside from the fact that any module installs would pretty much defeat 
> the purpose here.

Why is that? That is the point of modules.

Luke

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