display in terminal and log it to a file
Hello, if I am executing a command in DOS, how can I display it into the terminal window as well as log it in a file. So, for example if I want to do dir to view the contents in C:\, I want to view the contents in the terminal window as well as write the same thing to a file as well. So far I have
command1 >> C:\\export.log 2>&1
This will not show anything that command1 executed in the terminal window but rather shows it in export.log file. I want to show in both.
Any help is much appreciated.
Thanks
Sushant Dhakal
Re: display in terminal and log it to a file
Microsoft itself never made this possible. However, you can do it in UNIX. And, even better...you can use the UNIX ported tee.
http://unxutils.sourceforge.net/