detecting cd drives
hi
i am writing a program in java that uses the cd drives. i was wondering if there is a command in linux which can tell me if there is more than one cd drive installed and what type it is. Or if anyone knows if there is a java command which will achieve this thanks |
Welcome to LQ.
What distibution are you using? To detect CD drive on the system ,you can try this Check for directory /proc/ide/hda,hdb,hdc,hdd If directory present , look for file 'media' inside directory. Ex: $ cat /proc/ide/hda/media This will tell you what type of device that ide is.[It will have cdrom for a Cddrive] A scan on all four ide`s media files [hda.hdb,hdc,hdd] can find out the number of cddrives in the system. Also see the 'model' file for the Modelname of the media. If you need a command to check for media try $ hdparm -i /dev/hda [or hdb,hdc,hdd ] This gives information about the ide. |
All times are GMT -5. The time now is 02:21 AM. |