On Thu, Nov 29, 2012 at 05:57:46PM +0000, Jorge Almeida wrote:
> Anyone knows how to dig into /sys to find the serial number of a device (say,
> a USB pen)? I few days ago I found by trial and error something like
> $ cat 
> /sys/devices/pci0000:00/0000:00:06.1/usb2/2-4/2-4:1.0/host13/target13:0:0/13:0:0:0/block/sdc/../../../../../serial
> which gave me E68911000519
> Now I can't find nothing of the sort. (Yes, I know the path changes
> each time the
> device is plugged in, but even so)
> Any information that would put some order into this mess would be great.
> 
> TIA
> 
> Joreg Almeida

Why not look in dmesg output:

[871998.865035] usb 2-5: new high speed USB device number 4 using ehci_hcd
[871998.986925] usb 2-5: New USB device found, idVendor=13fe, idProduct=3600
[871998.986928] usb 2-5: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[871998.986930] usb 2-5: Product: patriot memory
[871998.986931] usb 2-5: Manufacturer:         
[871998.986932] usb 2-5: SerialNumber: 07B20F01654F84B8
[871998.987237] usb-storage 2-5:1.0: Quirks match for vid 13fe pid 3600: 4000
[871998.987257] scsi15 : usb-storage 2-5:1.0
[872000.021585] scsi 15:0:0:0: Direct-Access              patriot memory
PMAP PQ: 0 ANSI: 0 CCS
[872000.021983] sd 15:0:0:0: Attached scsi generic sg4 type 0
[872001.831285] sd 15:0:0:0: [sdd] 7811072 512-byte logical blocks: (3.99
GB/3.72 GiB)
[872001.831776] sd 15:0:0:0: [sdd] Write Protect is off
[872001.831779] sd 15:0:0:0: [sdd] Mode Sense: 23 00 00 00
[872001.832263] sd 15:0:0:0: [sdd] No Caching mode page present
[872001.832265] sd 15:0:0:0: [sdd] Assuming drive cache: write through
[872001.836389] sd 15:0:0:0: [sdd] No Caching mode page present
[872001.836392] sd 15:0:0:0: [sdd] Assuming drive cache: write through
[872001.870531]  sdd: sdd1
[872001.873413] sd 15:0:0:0: [sdd] No Caching mode page present
[872001.873415] sd 15:0:0:0: [sdd] Assuming drive cache: write through
[872001.873417] sd 15:0:0:0: [sdd] Attached SCSI removable disk
-- 
Happy Penguin Computers               >')
126 Fenco Drive                       ( \
Tupelo, MS 38801                       ^^
supp...@happypenguincomputers.com
662-269-2706 662-205-6424
http://happypenguincomputers.com/

Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting

Reply via email to