From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Brad Tilley" Date: Thu, 10 Nov 2011 15:06:58 +0000 Subject: udev to obtain hard drive serial number Message-Id: <44057.128.173.192.90.1320937618.squirrel@webmail.tuffmail.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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