Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a magic file name that gives the following effect?

$ mkfifo /tmp/fifo1 && cat /tmp/fifo1 &
$ foo --log-file /tmp/fifo
# now I can see the log as the program runs

I want something like

$ foo --log-file /proc/to_stdout
share|improve this question
It would be worth specifying the OS in questions like this. – Chris Down May 28 '12 at 11:36
I was hoping there was an answer for all (or all usable) unices... – Elazar Leibovich May 28 '12 at 15:23
There isn't, as far as I'm aware. – Chris Down May 28 '12 at 15:28
up vote 3 down vote accepted

You're looking for /dev/stdout or /dev/stderr as appropriate.

share|improve this answer
Which are symlinks to /proc/self/fd/1 and /proc/self/fd/2 respectively — the /dev entries may be absent, but the /proc ones are guaranteed to be there if proc is mounted. – Alexios May 28 '12 at 10:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.