Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-26-2009, 08:28 PM   #1
LQ Newbie
Registered: Jul 2008
Distribution: zenwalk
Posts: 3

Rep: Reputation: 0
How to read volume name on usbkey

Does anyone know how to get the volume name of an usbkey when it is plugged in?
I've used dd like this for getting the name of a dvd before but it doesn't work in this case.

root[couch]# dd if=/dev/sdc1 bs=1 skip=32808 count=32
::::::::::: :!:":#:$:32+0 records in
32+0 records out
32 bytes (32 B) copied, 0.000558731 s, 57.3 kB/s

Last edited by couchquail; 07-26-2009 at 08:36 PM.
Old 07-26-2009, 10:27 PM   #2
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
I know you can use "mlabel" to find the current volume label on a FAT 16/32 volume, but that requires that you set up the device in a configuration file beforehand. I assume you want this to be dynamic when you plug a new device in?

I believe HAL has the capability to report FAT volume labels to the system, as all the modern desktop environments now automatically mount removable devices as their volume names (for filesystems that have them, at least). But I don't know if there is an easy way to return that information.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
lvm volume mount as read only vishesh Linux - General 4 12-27-2008 04:55 AM
How to read/mount a volume-managed disk partition? tthtlc Linux - Software 11 03-25-2008 08:06 AM
Mounting a FAT volume read/write alkaholic Linux - Newbie 2 11-30-2007 08:05 AM
Read NTFS Hda5 volume the mac 13 Linux - Software 8 01-21-2005 02:54 AM
Volume labels in Debian cause everything to be mounted read-only? racoontje Debian 0 07-09-2004 04:40 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration