Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

What about using the 'script' command...

script -a
(run your commands)
exit

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

 
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.