LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-02-2006, 04:46 AM   #1
mback99
LQ Newbie
 
Registered: Dec 2005
Location: Sweden
Distribution: Slackware 10.2
Posts: 3

Rep: Reputation: 0
/dev


There are a lot of files in /dev.
Is there a way to see which device-files are
connected to actual devices?
For instance, what device-file is connected to my USB-DVD?
 
Old 04-02-2006, 08:07 AM   #2
atom
Member
 
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Rep: Reputation: 31
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.
 
Old 04-02-2006, 08:17 AM   #3
capicu
LQ Newbie
 
Registered: May 2005
Location: uk
Distribution: slackware
Posts: 12

Rep: Reputation: 0
Welcome to the Slackware forum, atom. Most of us are on 2.4.31 right now, and /sys is empty.
 
Old 04-02-2006, 08:37 AM   #4
mback99
LQ Newbie
 
Registered: Dec 2005
Location: Sweden
Distribution: Slackware 10.2
Posts: 3

Original Poster
Rep: Reputation: 0
Thank for your reply but I don't think we are talking about the same kind of /dev
In /dev on slackware 10.2 there are 2500+ files it seams...
You are right in your assumption that I don't know anything about this stuff, though
 
Old 04-02-2006, 08:39 AM   #5
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
I don't really know anything about dev, but you can use lspci, dmesg and look at /var/log/messages.
 
Old 04-02-2006, 08:53 AM   #6
atom
Member
 
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Rep: Reputation: 31
You can run fdisk -l (that's a lowercase L) and see which discs are connected.
"df" also lists that.

mount lists mounted devices. About other stuff it's hard to say for me, I have started my linux-jurney with a 2.6.2 kernel .
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB drive... /dev/sda1 doesn't show unless I try mounting /dev/sda as vfat finite Linux - Hardware 8 03-10-2009 12:52 AM
/dev/tty0, /dev/tty1, /dev/tty10...and so on...which should be used for a device ??? b0nd Slackware 2 04-02-2006 08:14 AM
I cannot access EITHER CD drive! And there's no /dev/hdc or /dev/hdd or /dev/cdrom! Dmalic Linux - Hardware 13 11-18-2005 07:11 PM
How can I boot either one of my hard drives /dev/hda or /dev/hdb, I have RH9 and FC2 omogunkristi Linux - General 1 06-21-2004 05:11 AM
Sandisk USB card Reader not linking /dev/sg0 to /dev/sda acidraven Linux - Hardware 1 06-19-2004 03:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration