LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 09-23-2007, 10:47 PM   #1
ankit_mcgill
Member
 
Registered: Aug 2005
Location: Montreal
Distribution: OpenSuse 10.3
Posts: 65

Rep: Reputation: 15
Shell - command to get the DVD disk label


Hi all,

just a quick question ... is there a command in bash to get the label of a DVD disk (could be a DVD movie or just a data disk with a label)

thanks for the help
a
 
Old 09-24-2007, 12:20 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
The volname command will return the DVD label. For example:

Code:
    $ volname /dev/hdc
    DARK_CITY_16X9
 
Old 09-24-2007, 12:50 AM   #3
ankit_mcgill
Member
 
Registered: Aug 2005
Location: Montreal
Distribution: OpenSuse 10.3
Posts: 65

Original Poster
Rep: Reputation: 15
thanks a lot .. that did the trick.
 
Old 09-24-2007, 03:14 PM   #4
ankit_mcgill
Member
 
Registered: Aug 2005
Location: Montreal
Distribution: OpenSuse 10.3
Posts: 65

Original Poster
Rep: Reputation: 15
Another question .. is there a command to get info about the DVD in drive .. lets say the date and time it was burnt ??

thanks
a
 
Old 09-24-2007, 03:33 PM   #5
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
The date and time of the burn is not recorded on the media. You can get additional information about the media and space usage with the 'dvd+rw-mediainfo' command (usually packaged as part of a 'dvd+rw-tools' rpm).
 
Old 09-24-2007, 03:39 PM   #6
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
I don't know a specific command for this, but you can always look at the time stamps on files in the filesystem. e.g. my DVD has mount point /media/cdrom0, and when I mount my Being John Malkovich DVD, the timestamp on that directory is changed to 2000-07-18 08:10. However, I don't know if that is the burn date, or something else. I should imagine it also depends on the correctness of the clocks on the system where the files were prepared / DVD was burned.

It might be better to look at the timestamp on all files and directories and choose the latest one. In my DVD the /media/cdrom0 has the oldest timestamp. The other files have timestamps between then and 10:13 on the same day. Since this is a mass-produced, pressed DVD, I doubt the fabrication of the disc took so long, so these times are probably the timestamps when the files were prepared or copied to the fabrication machine. It would be about right based on the release date of the film, but I expect you will find some with truly mad timestamps if they were prepared on machines with inaccurate clocks!
 
Old 09-24-2007, 04:25 PM   #7
ankit_mcgill
Member
 
Registered: Aug 2005
Location: Montreal
Distribution: OpenSuse 10.3
Posts: 65

Original Poster
Rep: Reputation: 15
hmm ... i guess i would go with the timestamp trick.

thanks matthewg42 and macemoneta .. appreciate it
 
  


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
goto/label command for scripting in bash shell terry.trent Linux - Software 3 07-09-2010 11:15 AM
Getting the label name of a cd/dvd TomG22 Linux - Software 3 05-14-2007 05:59 PM
Linux command to get the DVD label? jrfk2 Linux - General 7 01-15-2006 09:39 AM
Disk label problem Juniper34 *BSD 2 08-21-2003 07:01 AM
Disk label strangeness? MadCactus Linux - General 2 08-13-2003 01:24 PM


All times are GMT -5. The time now is 11:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration