What explains the following inconsistency in the reported contents of /dev/fd
?
erhannis@mnode6:/dev/fd$ ll /dev/fd/
total 0
dr-x------ 2 erhannis erhannis 0 Jan 12 22:10 .
dr-xr-xr-x 9 erhannis erhannis 0 Jan 12 22:10 ..
lrwx------ 1 erhannis erhannis 64 Jan 12 22:10 0 -> /dev/pts/8
lrwx------ 1 erhannis erhannis 64 Jan 12 22:10 1 -> /dev/pts/8
lrwx------ 1 erhannis erhannis 64 Jan 12 22:10 2 -> /dev/pts/8
lr-x------ 1 erhannis erhannis 64 Jan 12 22:10 3 -> /proc/24334/fd
erhannis@mnode6:/dev/fd$ ll
total 0
dr-x------ 2 erhannis erhannis 0 Jan 12 21:42 .
dr-xr-xr-x 9 erhannis erhannis 0 Jan 12 21:42 ..
lrwx------ 1 erhannis erhannis 64 Jan 12 21:42 0 -> /dev/pts/8
lrwx------ 1 erhannis erhannis 64 Jan 12 21:42 1 -> /dev/pts/8
lrwx------ 1 erhannis erhannis 64 Jan 12 21:42 2 -> /dev/pts/8
lrwx------ 1 erhannis erhannis 64 Jan 12 21:55 255 -> /dev/pts/8
Specifically, note that ll
alone shows a file 255
linked to /dev/pts/8
, but ll /dev/fd/
shows instead a file 3
linked to /proc/24334/fd
. (The proc number changes each time; I suspect it to be the process number of ll
itself.)
...I also note, now, that the dates are different - am I getting a different directory for .
than for /dev/fd/
? I further note that I can't create a file in /dev/fd (with either path).