in reply to (OT) how to identify a partition
I am not sure that I understood what you need but maybe Sys::Filesystem fits your needs.
Update:
After you specified your question this could be helpful
my $partitions = `sudo hdparm -i /dev/hda|grep Model`;
Update:
After you specified your question this could be helpful
The script must be run with root priviliges. If you use sudo you can use#!/usr/bin/perl -w # # use strict; my $partitions = `hdparm -i /dev/hda|grep Model`; my ($model,$firmware,$serial_no)=split /,/,$partitions; my @model = split /=/,$model; my @serial_no=split /=/,$serial_no; my @firmware=split /=/,$firmware; print "Model = $model[1]\tFirmware=$firmware[1]\tSerial No=$serial_no[ +1]\n";
my $partitions = `sudo hdparm -i /dev/hda|grep Model`;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: (OT) how to identify a partition
by leocharre (Priest) on Apr 20, 2008 at 19:03 UTC |
In Section
Seekers of Perl Wisdom