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

I have a program that takes a -o log_file option, which writes extra data to log_file.

Is there any way for me to redirect that to stdout?

i.e. is there a "special name" for stdout that can be used as a file name, like CONOUT$ on Windows?

share|improve this question
up vote 12 down vote accepted

Usually, programs write automatically to stdout if you don't specify a -o option. In the case you must go through the -o option, you can use -o /dev/stdout.

share|improve this answer
Ahhh /dev/stdout is exactly what I needed. Thank you!! :) – Mehrdad Jul 30 '11 at 21:32
And I won't call that "redirection" but just "direction" :-) – Stéphane Gimenez Jul 30 '11 at 21:32
Lol whatever you say :) – Mehrdad Jul 30 '11 at 21:34

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.