1

This question already has an answer here:

According to the terse documentation I managed to find, each file in /proc/$PID/fd is supposed to be a symlink to the actual file associated with that file descriptor. However, that doesn't appear to be what's happening.

# ls -l /proc/5678/fd
lr-x------ 1 root root 64 Oct 17 13:31 0 -> /dev/null
l-xw------ 1 root root 64 Oct 17 13:31 1 -> pipe:[15967534]
lr-x------ 1 root root 64 Oct 17 13:31 10 -> pipe:[54468]
lr-x------ 1 root root 64 Oct 17 13:31 11 -> pipe:[876576]
lrwx------ 1 root root 64 Oct 17 13:31 14 -> anon_inode:[eventpoll]
lrwx------ 1 root root 64 Oct 17 13:31 16 -> /lolrus/write.lock
lrwx------ 1 root root 64 Oct 17 13:31 3 -> socket:[5487432]
lrwx------ 1 root root 64 Oct 17 13:31 4 -> anon_inode:[eventfd]
lr-x------ 1 root root 64 Oct 17 13:31 5 -> /dev/urandom
...etc...

Of these, the only paths that actually exist are /dev/null, /dev/urandom and /lolrus/write.lock (which is a normal, regular file).

What the heck are all those other things? I can't find any documentation about them.

marked as duplicate by terdon Oct 17 '14 at 13:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.