* udev to obtain hard drive serial number
@ 2011-11-10 15:06 Brad Tilley
0 siblings, 0 replies; only message in thread
From: Brad Tilley @ 2011-11-10 15:06 UTC (permalink / raw)
To: linux-hotplug
What's the most stable way in which to obtain a hard drive serial number
using recent Linux kernels and udev. Normal users may call udevadm like
this to get the serial number:
/sbin/udevadm info --query=property --name /dev/sda | grep ID_SERIAL_SHORT
| tr = " " | awk '{print $2}'
output looks like this:
E3834563JPSNTN
How stable/reliable is this approach compared to other tools such as
hdparm, etc. Is there a better way to do this with udev?
Thanks for any advice,
Brad
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-11-10 15:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-10 15:06 udev to obtain hard drive serial number Brad Tilley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox