Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I uniquely identify an USB-device?

I was wondering how to get the unique id of a USB storage device. I already know how to fetch the SCSI serial id from this post : USB-drive serial number under linux C++ The post mentions using the Device Descriptor to get the ID. Can someone post some code to determine the Device Descriptor information under Linux?

like image 465
Ram Natarajan Avatar asked Dec 01 '10 17:12

Ram Natarajan


1 Answers

ls -l /dev/disk/by-id
like image 136
chris Avatar answered Oct 15 '22 15:10

chris