Capture all your activities
The tip shared here will help developers as well as general-purpose Linux users. It will allow you to save a remote syslog automatically to the local disk without doing a scp or cp, save all your terminal activities automatically to the local disk, recall a forgotten command and trace back what commands you run on your system to debug a specific problem. So let’s look at all that needs to be done.
First, create a directory named termOutput in your home directory and then create a file called termOutput/sessionId with the initial value 0.
Now create a directory named bin in your home directory and create an executable script under bin called captureScreen with the following code in it: