partition info in perl without root access
Peter L. Peres
plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org
Tue Nov 30 19:15:32 UTC 2004
On Tue, 30 Nov 2004, Madison Kelly wrote:
> 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!
cat /proc/partitions
Peter
--
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