Short reply: not through /dev, no.
Long reply:
There's a /sys filesystem on your computer right? You can browse the /sys and the final files in there are usually device spec files. It takes a bit of getting used-to, but once you get it and read the files, there's usually the manufacturer listed etc.
Once you identify your hardware through sys, you can look at it's address, and map it to /dev, by alphabetically arranging installed devices and then seeing which is which by counting to the right one and then seeing it in /dev.
There's another, easier method though:
If you have a scsi/sata disc, it'll be listed as sda, the 2nd will be listed as sdb etc. sata cdroms are listed as sr0 and company.
There's a nifty little program called eject. If you type (as root, so you don't have to deal with permission problems) eject /dev/something, that cdrom should pop out. That's another way to ID them.
Other than that, you could look at how your dbus daemon is configured and how it maps devices from sys to /dev, so this is another option...
Other than that, you can just experiment.
Oh, I forgot about the usb-dvd. Usb devices are usually in the usb/ directory, and they are all connected. If a device isn't connected, it doesn't exist in /dev (if you have dbus installed, at least, but lately the devfs manager is deprecated, so you probably do).
You can always try the manpages if you don't know what sth is, because usually it's an internal device. Some devices are virtual, like /dev/urandom, which provides random numbers to you if you read it.
The /dev filesystem is a long topic, so I guess the best thing to do would be to read a howto or something. Search google.
If, however, I have misjudged you and you know a lot more about this stuff than I told you, i'm sorry. But the "there are a lot of files in /dev" sentence served as a giveaway.
Last edited by atom; 04-02-2006 at 08:12 AM.
|