Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

How I can accomplish STDOUT to be to logged in a file (appending), but preserving the flow (leave STDOUT to STDOUT) ?

STDOUT should work transparently, but should be logged also into a file, without messing with "tee" on each command input. Same for STDERR.

Simply, mirror output to file.

share|improve this question
Closest thing I can think of: script. – Steven Monday Mar 23 '12 at 19:27

What about using the 'script' command...

script -a
(run your commands)

This will create a file called typescript that records all commands that you input and their respective output.

share|improve this answer
nice. I never knew that this existed! – Safado Mar 23 '12 at 21:03

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.