LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Redirect terminal output to file AND terminal (http://www.linuxquestions.org/questions/linux-general-1/redirect-terminal-output-to-file-and-terminal-11915/)

shan 01-16-2002 01:05 PM

Redirect terminal output to file AND terminal
 
I've figured out how to redirect the terminal standard output to a file using " > " (e.g. ls -al > list.txt). Anyone know how to send output to the screen AND a file at the same time?

pbharris 01-16-2002 09:33 PM

hello,
command > file | cat file

linuxcool 01-16-2002 10:07 PM

Try command | tee > file

GaryB 09-29-2006 08:36 AM

Use tee command
 
Try this one

{command} | tee file


All times are GMT -5. The time now is 07:43 AM.