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 12-23-2004, 08:03 AM   #1
LQ Newbie
Registered: Dec 2004
Posts: 5

Rep: Reputation: 0
cdrecord and media with items written on it

is there anyway in cdrecord to find out whether the media is able to be written to, as in if i insert and try to burn onto an already written media.

i'm trying to write a c shell script file that echos "Media can not be written to" if i'm not able to write to the media.

i only have access to cdrecord and terminal.
Old 12-23-2004, 08:23 AM   #2
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,264

Rep: Reputation: 60
maybe issuing a cdrecord dev=0,0,0 -toc
and if the last 2 characters are -1 then the disk is not writable.
Old 12-23-2004, 08:30 AM   #3
LQ Newbie
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
i have it put into an output, how do i do a grep in an if statement to search to see if those two characters exist?
Old 12-23-2004, 09:46 AM   #4
LQ Newbie
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
i got the last question figured out.

another cdrecord question. is there any way to differentiate if the media inside the writer is a cd or a dvd? i have a dvdrw and i need it to reject when i try to write to cd when i put in a dvd media.


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
cdrecord: able to write successfully to CDRW, but not CDR media vjimin Linux - General 4 11-07-2005 07:36 AM
cdrecord: no media present - tray closed message DPenguin Linux - Software 5 03-31-2005 01:39 AM
Burning with cdrecord- old memorex cdrws work, my other media wont. louman Linux - Hardware 1 01-29-2005 03:18 PM
Cannot read package data from installation media. Media error? </m0r1arty> SUSE / openSUSE 2 01-26-2005 08:57 PM
k3b / cdrecord burning audio, How to ignore Media Capability? moskito01 Linux - Software 1 07-13-2004 07:29 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:33 AM.

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