One Two Three
One Two Three

Reputation: 23517

Is it possible to redirect the output of a command to one file, but still keep the output echoing on the terminal?

Is it possible to redirect the output of a command to one file, but still keep the output echoing on the terminal?

I want the output to go to a file, but I still want to see it on the terminal (just so I know something is going on)

Upvotes: 1

Views: 70

Answers (2)

deagh
deagh

Reputation: 2732

You can use "tee" i.e.

ls -ltr | tee -a mylog.log

Upvotes: 2

Alberto Zaccagni
Alberto Zaccagni

Reputation: 31580

Yes, tee does what you want:

command | tee output.log

Upvotes: 7

Related Questions