[clug] Is a CD in a drive..

Andrew Janke a.janke at gmail.com
Wed Mar 25 05:53:32 GMT 2009


Hi all,

Anyone know a magic cat  /proc/blue/blah/blonk incantation that I can
use in a (sh) script to tell if a CDROM is in a drive?

Note, _in_ the drive not necessarily mounted. All I have so far is:

   $ scsi_ready /dev/scd0

Seems to work but I don't know if it is the "right" way to do such
things and there seems to be no docco on scsi_ready.


suggestions along the lines of:

   $ dd if=/dev/null of=/dev/scd0 bs=512 count=1

will be ignored.. :)


ta


--
Andrew Janke
(a.janke at gmail.com || http://a.janke.googlepages.com/)
Canberra->Australia    +61 (402) 700 883


More information about the linux mailing list