RE: Pure Perl df
From: Luke Bakken (Luke.Bakken_at_getronics.com)
Date: 12/30/03
- Next message: Andrew Gaffney: "Re: mass-replacing large block of text"
- Previous message: Charles K. Clarkson: "RE: mass-replacing large block of text"
- Maybe in reply to: James Edward Gray II: "Pure Perl df"
- Next in thread: James Edward Gray II: "Re: Pure Perl df"
- Reply: James Edward Gray II: "Re: Pure Perl df"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Dec 2003 13:56:05 -0800 To: "James Edward Gray II" <james@grayproductions.net>, "perlgroup List" <beginners@perl.org>
> 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
- Next message: Andrew Gaffney: "Re: mass-replacing large block of text"
- Previous message: Charles K. Clarkson: "RE: mass-replacing large block of text"
- Maybe in reply to: James Edward Gray II: "Pure Perl df"
- Next in thread: James Edward Gray II: "Re: Pure Perl df"
- Reply: James Edward Gray II: "Re: Pure Perl df"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|