unix command: tee

tee command is used to save output of a program shown on a terminal. For example, the following command saves result of ls command as a file text.txt
  ls | tee test.txt
To save error output, add the following option:
make 2>&1 | tee make.log

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s