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


In reply to Re: How to get a USB-drive label by NetWallah
in thread How to get a USB-drive label by Steve_BZ

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.