From: PengYu.UT on
I'm on ubuntu linux. Although there are many webpages that discuss /
dev/fd/0, but I'd like to read the man page in linux. Does anybody
know if there is a man page for /dev/fd/0?
From: Seebs on
On 2010-06-09, PengYu.UT(a)gmail.com <pengyu.ut(a)gmail.com> wrote:
> I'm on ubuntu linux. Although there are many webpages that discuss /
> dev/fd/0, but I'd like to read the man page in linux. Does anybody
> know if there is a man page for /dev/fd/0?

I don't know. OS X has one under "man fd". The first Linux I tried on
came up with the floppy drive man page, which seems unusual. I
see one passing reference in the output of "man proc". On the BSD
systems, it's in section 4, so it might be kernel documentation.

In short, so far as I can tell, there is no man page for it on the
Linux system I tried. Write one.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
From: Alan Curry on
In article <slrni0tr1g.9b8.usenet-nospam(a)guild.seebs.net>,
Seebs <usenet-nospam(a)seebs.net> wrote:
>On 2010-06-09, PengYu.UT(a)gmail.com <pengyu.ut(a)gmail.com> wrote:
>> I'm on ubuntu linux. Although there are many webpages that discuss /
>> dev/fd/0, but I'd like to read the man page in linux. Does anybody
>> know if there is a man page for /dev/fd/0?
>
>I don't know. OS X has one under "man fd". The first Linux I tried on
>came up with the floppy drive man page, which seems unusual. I
>see one passing reference in the output of "man proc". On the BSD
>systems, it's in section 4, so it might be kernel documentation.
>
>In short, so far as I can tell, there is no man page for it on the
>Linux system I tried. Write one.

It's documented in a sensible place corresponding to its real location.

$ ls -l /dev/fd
lrwxrwxrwx 1 root root 13 Feb 15 2009 /dev/fd -> /proc/self/fd

proc(5) contains a section on /proc/[pid]/fd (and a section on /proc/self
just in case you didn't know about that already)

--
Alan Curry
From: Seebs on
On 2010-06-09, Alan Curry <pacman(a)kosh.dhis.org> wrote:
> It's documented in a sensible place corresponding to its real location.

> $ ls -l /dev/fd
> lrwxrwxrwx 1 root root 13 Feb 15 2009 /dev/fd -> /proc/self/fd

> proc(5) contains a section on /proc/[pid]/fd (and a section on /proc/self
> just in case you didn't know about that already)

I'm not sure I am convinced that this is the "real" location. Assuming
that you might occasionally use more than one kind of Unixy system,
"/dev/fd/0" is the name that you would be looking for, "/proc/self/fd"
is an implementation detail.

Even though I know malloc is often implemented in terms of mmap, I expect
"man malloc" to tell me about the malloc interface, rather than seeing
it as a sub-section in the mmap man page...

Not quite analagous, since malloc often has multiple strategies; feel
free to set the wayback machine to before mmap() was used for malloc,
and substitute sbrk().

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
From: Andrew McDermott on
PengYu.UT(a)gmail.com wrote:

> I'm on ubuntu linux. Although there are many webpages that discuss /
> dev/fd/0, but I'd like to read the man page in linux. Does anybody
> know if there is a man page for /dev/fd/0?

My system:
Description: Ubuntu 8.04.4 LTS
Release: 8.04
Codename: hardy

apropos fd gives:
fd (4) - floppy disk device

From man fd:
FILES
/dev/fd*

I notice that /dev/fd/* are all symbolic links on my system.

I hope this helps.

Andrew