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? ls -l /dev/disk/by-id I do it with HAL in C++ / C by using QT. Found some blog about it: How to detect if /dev/* is a USB device Would be also possible to do it by using shell & HAL. I suggest to use libusb . You can find the documentation here . duskwuff To add to what everyone