I have a script which, when I run it from PuTTY, it scrolls the screen. Now I want to go back to see the rros but when I scroll up I can see the past commands but not the output of the command.
How can I see the past output?
If you don't pipe the output of your commands into something like
Putty has settings for how many lines of past output it retains in it's buffer.
If you use something like
I would recommend using screen if you want to have good control over the scroll buffer on a remote shell.
You can change the scroll buffer size to suit your needs by setting:
Then you should run your script in a screen session, e.g. by executing
It's also possible to enable logging of the console output to a file. You can find more info on the screen's man page.