...making Linux just a little more fun!
[ In reference to "/tag/2.html" in LG#issue72 ]
Kevin R. Bulgrien [kbulgrien at worldnet.att.net]
"getting volume label for CD" at https://linuxgazette.net/issue72/tag/2.html does not really have a good answer. I suggest something like this:
To find the volume name of a CD or other device, use the volname utility. For example:
$ grep hdc /etc/fstab /dev/hdc /mnt/cdrom auto umask=0022,users,iocharset=utf8,sync,noauto,ro,exec 0 0 $ sudo volname /dev/hdc 46368_546292The volume name of the CD in /dev/hdc is "46368_546292".
-- Kevin R. Bulgrien kbulgrien@att.net
Ben Okopnik [ben at linuxgazette.net]
On Sun, Apr 08, 2007 at 09:35:26PM -0500, Kevin R. Bulgrien wrote:
> "getting volume label for CD" at https://linuxgazette.net/issue72/tag/2.html does not really > have a good answer. I suggest something like this: > > To find the volume name of a CD or other device, use the volname utility. > For example: > > $ grep hdc /etc/fstab > /dev/hdc /mnt/cdrom auto umask=0022,users,iocharset=utf8,sync,noauto,ro,exec 0 0 > $ sudo volname /dev/hdc > 46368_546292 > > The volume name of the CD in /dev/hdc is "46368_546292".
Actually, we had a great discussion about it just a couple of issues after that:
https://linuxgazette.net/issue74/tag/7.html
I still have the script that Ernesto sent in that time - and it still works just as well as it ever did. Note that it extracts far more than just the name.
-- * Ben Okopnik * Editor-in-Chief, Linux Gazette * https://LinuxGazette.NET *