CDROM question

bscott at ntisys.com bscott at ntisys.com
Tue Aug 17 22:41:02 EDT 2004


On Tue, 17 Aug 2004, at 7:24am, colet at code-energy.com wrote:
> Nothing exciting - just a backup program.  In a given week, I accumulate
> about 10-15 CD's worth of data that needs to be backed up and the company
> is too cheap to go with tape.

  Penny wise, pound foolish.  But I'm sure I'm preaching to the choir.

  You might look into DVD recorders, though.  They're pretty cheap, and at
least you can stuff more data onto a single disc.

> I'm just trying to write the application to be friendly enough that I
> don't really have to engage my brain at all to perform the backups - the
> friendly little program tells me everything I need to do.

  Well, as far as *that* goes, I imagine you could make most of it happen
just by using the "eject" command.  It even has an option (-t) to close an
open tray.

  About the only tricky part is checking for the existence of media.  Aside
from that "dd" hack I posted before, the "cdrecord" command has a number of
options that may be useful.  The "-toc" and "-atip" switches, in particular,
can give you details about media.  The only problem is, they also cause any
open CD tray to close.  At least, they do on my Plextor and Yamaha SCSI
CD-RW drives.

  I'm pretty sure there's a SCSI command that will test if a drive tray is
open or closed, but I suspect you'd have to write some custom code to
actually make use of it.

-- 
Ben Scott <bscott at ntisys.com>
| The opinions expressed in this message are those of the author and do  |
| not represent the views or policy of any other person or organization. |
| All information is provided without warranty of any kind.              |




More information about the gnhlug-discuss mailing list