LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-23-2004, 07:03 AM   #1
CWLim
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, 07:23 AM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
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, 07:30 AM   #3
CWLim
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, 08:46 AM   #4
CWLim
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.
 
  


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


All times are GMT -5. The time now is 07:41 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration