in reply to (OT) how to identify a partition
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";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: (OT) how to identify a partition
by leocharre (Priest) on Apr 20, 2008 at 19:03 UTC |