# 'fd' entry in devfs.rules



## usakhncit (Dec 28, 2020)

Hi
What does 'fd' in the following entry of (/etc/devfs.rules) mean, a "floppy disk", a "file descriptor" or something else?

```
add path 'fd[0-9]\*' mode 666
```
Thanks


----------



## SirDice (Dec 28, 2020)

Why don't you read fd(4) and find out what it is?


----------



## usakhncit (Dec 28, 2020)

SirDice said:


> Why don't you read fd(4) and find out what it is?


Now, you are being harsh here, without knowing the background 
I did check it. 'fd' manpage shows that it is file descriptor. However, 'fdc' manpage shows that it is floppy controller with following description:


> By default, this driver creates a single device node /dev/fdN for each attached drive with number N.


Moreover, ls /dev/fd*, shows: 0 1 2 3 4 (nodes)
As, the syntax of the file /etc/devfs.rules shows similar pattern i.e. "fd[0-9]", therefore, it creates a confusion that whether it is a File Descriptor or a Floppy Disk.


----------



## SirDice (Dec 28, 2020)

From fd(4):

```
DESCRIPTION
     The files /dev/fd/0 through /dev/fd/# refer to file descriptors which can
     be accessed through the file system.
```
From fdc(4)

```
FILES
     /dev/fd*      floppy disk device nodes
```

So, which one do you think applies to /dev/fd[0-9]* then? 



zetrotrack000 said:


> Now, you are being harsh here, without knowing the background


You didn't mention the background, so how can I know? And I'm trying to teach you how to lookup the information because the answer is already right in front of you.



zetrotrack000 said:


> As, the syntax of the file /etc/devfs.rules shows similar pattern i.e. "fd[0-9]",


Similar, yes. But not the same. One is /dev/fd/[0-9], the other is /dev/fd[0-9].


----------

