Maybe you can parse the output of these commands, and piece the information together:
~$ lsusb
....
Bus 001 Device 005: ID 0424:2602 Standard Microsystems Corp. USB 2.0 H
+ub
Bus 001 Device 010: ID 13fe:3100 Kingston Technology Company Inc. 2 GB
+ USB stick
...
~$mount
...
/dev/sde1 on /media/0D5D-ABCE type vfat (rw,nosuid,nodev,uhelper=udisk
+s,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush)
~$ ls -l /dev/disk/by-path/
total 0
drwxr-xr-x 2 root root 340 2011-05-25 19:45 ./
drwxr-xr-x 6 root root 120 2011-05-25 12:42 ../
lrwxrwxrwx 1 root root 9 2011-05-25 19:42 pci-0000:00:02.1-usb-0:2.1
+.1:1.0-scsi-0:0:0:0 -> ../../sdc
lrwxrwxrwx 1 root root 9 2011-05-25 19:42 pci-0000:00:02.1-usb-0:2.1
+.1:1.0-scsi-0:0:0:1 -> ../../sdd
lrwxrwxrwx 1 root root 9 2011-05-25 19:45 pci-0000:00:02.1-usb-0:5:1
+.0-scsi-0:0:0:0 -> ../../sde
lrwxrwxrwx 1 root root 10 2011-05-25 19:45 pci-0000:00:02.1-usb-0:5:1
+.0-scsi-0:0:0:0-part1 -> ../../sde1
lrwxrwxrwx 1 root root 9 2011-05-25 19:42 pci-0000:00:08.0-scsi-0:0:
+0:0 -> ../../sda
-- SO in this case, /dev/sde1 is the partition on my 2GB kingston key,
+ mounted at /media/0D5D-ABCE
Syntactic sugar causes cancer of the semicolon. --Alan Perlis
|