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++ Th
do sudo blkid and it will list the id of all mounted devices with a filesystem
sudo blkid