LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-14-2007, 12:26 PM   #1
TomG22
LQ Newbie
 
Registered: Aug 2005
Posts: 6

Rep: Reputation: 0
Getting the label name of a cd/dvd


Hi folks,

I'm searching a way to get the name of label of a dvd or cd disc.

I would like to make a script, to create ISO file of a DVD's or CD's in batch modus and using it's label name as the filename for the iso.

For example, if the DVD has a label like "MY_MOVIE", I would like to use it as the file name for the iso, thus "MY_MOVIE.iso"

What's inside the script till now:

Code:
#!/bin/bash
# Create an ISO image of a dvd or cd using it's label name as filename
# Open CD/DVD tray
eject /dev/hdc
# Some code to make the script wait till disk inserted
# Close CD/DVD tray
eject -t /dev/hdc
# I need the label of de cd, let's suppose it's in a variable
disk_label=`some command to get the disk's label name`
dd if='/dev/hdd' of='~/$disk_label'
# Open CD/DVD tray
eject /dev/hdc
I'm using Ubuntu 7.04.

Someone who could help me out with this?

Thanks in advance
 
Old 05-14-2007, 01:20 PM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 57
For example type something like: /lib/udev/vol_id --export /dev/hdc
 
Old 05-14-2007, 02:55 PM   #3
TomG22
LQ Newbie
 
Registered: Aug 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Wow! It does work Many thanks.

Just need to do some "grep-ing" and the script can run fully automated
 
Old 05-14-2007, 04:59 PM   #4
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 57
Your welcome.
 
  


Reply


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
Any CD/DVD label software for linux ? Christof999 Linux - Software 1 10-05-2006 06:59 PM
Linux command to get the DVD label? jrfk2 Linux - General 7 01-15-2006 08:39 AM
A cd/dvd label maker for mandriva linux? Rick069 Mandriva 2 11-20-2005 01:42 PM
How can I display the label of a DVD? klausabc Linux - General 0 09-26-2004 08:21 AM
Invalid Unicode on DVD Disc/Volume Label DraconianTimes Linux - Software 2 11-30-2003 02:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:55 AM.

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