LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Shell - command to get the DVD disk label (https://www.linuxquestions.org/questions/linux-newbie-8/shell-command-to-get-the-dvd-disk-label-586839/)

ankit_mcgill 09-23-2007 09:47 PM

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

macemoneta 09-23-2007 11:20 PM

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

Code:

    $ volname /dev/hdc
    DARK_CITY_16X9


ankit_mcgill 09-23-2007 11:50 PM

thanks a lot :D .. that did the trick.

ankit_mcgill 09-24-2007 02:14 PM

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

macemoneta 09-24-2007 02:33 PM

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).

matthewg42 09-24-2007 02:39 PM

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!

ankit_mcgill 09-24-2007 03:25 PM

hmm ... i guess i would go with the timestamp trick.

thanks matthewg42 and macemoneta .. appreciate it :)


All times are GMT -5. The time now is 10:25 AM.