|
-
October 7th, 2010, 12:02 PM
#1
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
-
October 14th, 2010, 10:53 PM
#2
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/
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|