LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Finding my CD-ROM device by find command? (https://www.linuxquestions.org/questions/linux-software-2/finding-my-cd-rom-device-by-find-command-749101/)

kushalkoolwal 08-20-2009 02:32 PM

Finding my CD-ROM device by find command?
 
My system has a PATA CDROM as /dev/scd0 and a USB CDROM as /dev/scd1.

Right now I can detect/find my USB-CDROM by the following command:
Code:

find /dev/disk/by-path/ -type l -iname \*usb\*scsi\* -print0 | xargs -0 -iD readlink -f D | grep scd

Output:
/dev/scd1

However, what modification should make to the above command toto find my PATA CD-ROM?

I tried
Code:

find /dev/disk/by-path/ -type l -iname \*ata\*scsi\* -print0 | xargs -0 -iD readlink -f D | grep scd

and

find /dev/disk/by-path/ -type l -iname \*cdrom\*scsi\* -print0 | xargs -0 -iD readlink -f D | grep scd

From where do I find the device type for my PATA CD-ROM to substitute in the above command?


All times are GMT -5. The time now is 01:25 PM.