Hard drive / mouse serial number retrieval?
Chris Ball
cjb at mrao.cam.ac.uk
Thu Jul 13 16:04:12 EDT 2006
Scott,
> I actually do mean serial number. I figured a mouse probably
> wouldn't have one programmed in (though I figured I'd ask anyway),
> but a hard drive might.
Ah, right. I've just found a few ways:
havoc:cjb~ % sudo smartctl -d ata --all /dev/sda
=== START OF INFORMATION SECTION ===
Device Model: HDT722525DLA380
Serial Number: ...
havoc:cjb~ % sudo hdparm -iI /dev/sda
ATA device, with non-removable media
Model Number: HDT722525DLA380
Serial Number: ...
I also found http://linuxbasics.org/tutorials/using/using_udev , which
mentions using the serial number of USB disks to let your machine's udev
know where they should be mounted each time. Neat!
- Chris.
--
Chris Ball <cjb at mrao.cam.ac.uk> <http://blog.printf.net/>
More information about the Discuss
mailing list