partition info in perl without root access

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Tue Nov 30 16:08:52 UTC 2004


Hi all,

   I am trying to find a way in perl as a regular user to get the same 
type of information as I get when I run 'fdisk -l' as root. Currently I 
have put 'fdisk' in my '/etc/sudoers' file and use sudo to get the data. 
This obviously is not ideal though because 'fdisk' has many potentially 
dangerous uses than simple partition information gathering.

   Does anyone know of a way that I can get information like which 
partitions are online but NOT mounted (probably most important), how 
much space is used and available on a given partition and so forth? Thanks!

Madison
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list