Find out if an audio CD is inserted in the tray of the CD/DVD drive
scar at drigon.com
Tue Jan 5 00:42:45 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
Raseel Bhagat @ 01/03/2010 10:03 PM:
> On Mon, Jan 4, 2010 at 10:00 AM, Detlef Lechner <Detlef.Lechner at gmx.net>wrote:
>> what is the most elementary command line command to find out if an audio
>> CD is inserted in the tray of the CD/DVD drive?
> Are you looking specifically for "audio" CDs only or any CD in general.
i think he wants to know, via a command, whether or not there is an
audio CD in the drive.
best i could come up with is:
which will return, among other things, "Toc Type: CD-DA or CD-ROM" if
you have an audio CD in the drive. however, in my experiment with a
data CD in the drive, cdrdao was not able to access the drive and
returned open errors for several seconds before dumping SCSI transport
information... not very graceful.
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
More information about the ubuntu-users