Retrieving Serial Numbers of USB disks from Scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From a script, I need to retrieve, if possible, the serial number of
each disk-like device on my embedded system running linux 2.6.31
(yeah, I know, its not my choice).

I find it in (say) /proc/scsi/usb-storage/3, where 3 is the scsi # it
got this time.

If I search on the web, they say its impossible to get the serial
numbers of usb devices, but obviously, they are wrong.

Is there a right way to retrieve the serial number of, say, /dev/sdb,
from the maze of twisty symlinks in /sys and /proc?  Or do I make one
up and hope I thought of all the special cases?

Thanks!

-- Perry

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux