OK, so bash is the shell I am using and the df utility is a standard Xnix 
command. My question is, is there a perl way
of getting the stats on partitions without having to shell out using system() 
or exec()?

Tony

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Phoenix
> Sent: Monday, February 05, 2007 11:48 AM
> To: [EMAIL PROTECTED]
> Cc: beginners@perl.org
> Subject: Re: stats on partitions
> 
> On 2/5/07, Tony Heal <[EMAIL PROTECTED]> wrote:
> 
> > Specifically I want to get the total, used and available space similar
> > to what the bash df command does.
> 
> I don't believe that bash has a df command, but there's a standard
> Unix utility called df instead. There's no need to invoke bash in
> order to run the df command (though if you did invoke it through bash,
> it wouldn't make a noticeable difference in runtime).
> 
> In order to access the system's filesystem information, the Unix
> utility df is a set-id program (one with special privileges). That
> means that a Perl program that could access that information directly
> would also have to be privileged, and thus written with extreme care.
> So, it's safer and easier all around to simply run the df program.
> Will that work for you?
> 
> Hope this helps!
> 
> --Tom Phoenix
> Stonehenge Perl Training


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to