LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-11-2008, 03:54 AM   #1
davidbow
LQ Newbie
 
Registered: Nov 2007
Posts: 2

Rep: Reputation: 0
Files in /dev directory


What I cannot understand is why there are so many device files in the /dev directory.

On start up, why not just interrogate the hardware and only create the device files as needed ??

Thanks for any enlightenment
 
Old 09-11-2008, 04:09 AM   #2
RMLinux
Member
 
Registered: Jul 2006
Posts: 260

Rep: Reputation: 37
Quote:
Originally Posted by davidbow View Post
What I cannot understand is why there are so many device files in the /dev directory.

On start up, why not just interrogate the hardware and only create the device files as needed ??

Thanks for any enlightenment
some device listed are present on your pc, some are reserve for future purposes.

http://www.cpqlinux.com/dev.html

fd0=floppy do you have floppy?
hda=hard disk....etc..etc..fax, modem.....sound...
 
Old 09-11-2008, 04:17 AM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Quote:
Originally Posted by davidbow View Post
What I cannot understand is why there are so many device files in the /dev directory.

On start up, why not just interrogate the hardware and only create the device files as needed ??

Thanks for any enlightenment
Most distros already do this. That's the purpose of udev. In the past, we had either hotplug, or a static /dev filesystem (which was a real pain, if you ask me). Most devices under /dev nowadays should be real devices, or symlinks to real devices.

One thing that I don't know much about is about the bunch of tty* devices (which always seemed exaggerated to me), but I am not interested enough to investigate that.
 
Old 09-11-2008, 05:09 AM   #4
RMLinux
Member
 
Registered: Jul 2006
Posts: 260

Rep: Reputation: 37
Quote:
Originally Posted by i92guboj View Post
Most distros already do this. That's the purpose of udev. In the past, we had either hotplug, or a static /dev filesystem (which was a real pain, if you ask me). Most devices under /dev nowadays should be real devices, or symlinks to real devices.

One thing that I don't know much about is about the bunch of tty* devices (which always seemed exaggerated to me), but I am not interested enough to investigate that.
http://www.linux.com/base/ldp/howto/...l-HOWTO-7.html

why a lot of tty....com1, com2, com3
also it is use in terminal n..n

just try google search :-)
 
Old 09-11-2008, 05:17 AM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Quote:
Originally Posted by RMLinux View Post
http://www.linux.com/base/ldp/howto/...l-HOWTO-7.html

why a lot of tty....com1, com2, com3
also it is use in terminal n..n

just try google search :-)
Nope.

Code:
# ls /dev/[pt]ty* | wc -l
581
That's what I meant with "exaggeration" hehe. 581 devices seems a bit too much.

I understand why there must be a reasonable number of fixed terminals at boot time, supporting a number of different devices, that doesn't explain such a huge number, and most distros seems to do the same to a greater or lesser degree. If more are needed at certain point, udev should be able to plug them dynamically just like it does with the rest of the devices.

Anyway, as I said, I am really not that interested in the issue, and that's why I haven't researched about it. I just spoke about it because for the rest, the stuff in /dev is pretty minimal nowadays, and it's created by udev as required.

Total 801, [pt]ty's: 581. That makes 223 nodes that are any other thing, and some of them will be symlinks and dirs, so, as you see, a very big percentage or the real nodes are just [pt]ty's. Insane I'd say

Last edited by i92guboj; 09-11-2008 at 05:28 AM.
 
  


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
Missing dev/sound directory files BACTRATE Mandriva 0 03-13-2006 08:34 AM
Autozipping files from 1 directory & dropping them in other directory ??? amitsharma_26 Linux - Networking 5 10-22-2005 07:09 AM
no files in /dev directory balajia82 Linux - Software 1 10-12-2005 09:18 PM
AIDE found differences between database and files in dev directory!! ddaas Linux - Security 1 06-29-2005 07:17 AM
Automatically Copying files from the ftp directory into the html directory swatward Linux - General 3 04-17-2005 11:55 PM


All times are GMT -5. The time now is 09:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration