To give you some context, I have a linux server and need to "tail -f" 8 log files. Nowadays, I have to open 8 putty consoles, redirect output to a file and execute in each console tail -f file1... tail -f file2... etc. After that, I have each log file being updated in live in my local workstation and can use tools like Baretail to process logs quite well.
This process is so annoying, so I started looking for a better process and found a very interesting way of improving it. I found that executing below command:
Code: Select all
(plink.exe -l user -pw password myhost tail -f SystemOut.log) > MySystemOut.log
...plink.exe (putty link) entablishes a connection to myhost, execute tail -f command on SystemOut.log, and using parentheses I redirect tail output to a local file on MySystemOut.log
This command works great although it never finish because tail -f is infinite.
I want to improve this process in order to create a bat file that carries out the following
Code: Select all
(plink.exe -l user -pw password myhost tail -f SystemOut.log) > MySystemOut.log
(plink.exe -l user -pw password myhost tail -f SystemErr.log) > MySystemErr.log
(plink.exe -l user -pw password myhost tail -f App.log) > MyApp.log
Can anyone give me a hand on this? I tried lots of things like using CMD, START but none worked for me.
Thanks a lot in advance!