Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: How to get a USB-drive label

by NetWallah (Canon)
on May 26, 2011 at 03:13 UTC ( [id://906741]=note: print w/replies, xml ) Need Help??


in reply to How to get a USB-drive label

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://906741]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-25 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found