[NTLUG:Discuss] detect disk in cdrom

Richard Geoffrion ntlug at rain4us.net
Mon Jul 12 08:58:42 CDT 2004


> ----- Original Message -----
> From: "joseph beasley" <joe_beasley at yahoo.com>
> To: <discuss at ntlug.org>
> Sent: Saturday, July 10, 2004 12:18 AM
> Subject: [NTLUG:Discuss] detect disk in cdrom
>
>
>> Is there a way to detect a disk in a cdrom?  I'm writing a script to
>> backup to my CDRW each night, but I need the script to abort if I
>> forget to put a cd in before I leave.
>>
>> The script is just a shell script using mkisofs and cdrecord.
>>

What about doing a 'cdrecord -inq'   # -inq do an inquiry for the drive and
exit.  does that return any usable info?

--
Richard




More information about the Discuss mailing list