Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer
2  
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

 
discard

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.