Display & log command output simultaneously
* * * * * 1 votos
November 6th, 2006 toydi Posted in Common, tee | Hits: 5203 |
To display and log the output from a command at the same time:
ls -l | tee -a file.log
In this example, it will display the directory listing output and as well, save the output into file.log. The option -a signals the command to append rather than overwrite the file.
Live Chat!









Leave a Reply