I am running commands remotely stuff
ing them into screen
commands via SSH. Rather than type directly into the terminal displayed, I use remote SSH commands which are run by clicking a button in a GUI. I use the screen
command because it allows me to see the terminal without having to type directly in it.
For every command executed I want the screen output to be saved to a specified file, in addition to being displayed on the terminal. Not all commands are necessarily executed by stuff
ing into the remote screen. The commands can be saved into a script which is uploaded to the remote computer and the screen
stuff
command used to run it.
How do I setup the command to save to a named file in addition to displaying the output as normal. Use of screen
is a convenience but I am looking for a method which can work without screen/tmux
being involved.
script
command? Or if you want a more integrated solution, maybe asciinema.org ? – Stephen Harris Jul 15 '16 at 14:02ssh $host screen
? If it's this simple, you could justtee
the output into a file – Hachi Jul 15 '16 at 14:03tee
and it looks like it will do what I want. I thought I asked this kind of question before and didn't get an answer. I will try it out and get back to you. – vfclists Jul 15 '16 at 18:28