Linux and Unix script command
Records everything printed on your screen. The record is recorded to the filename, if no filename is specified results are recorded to the file transcript.
script [-a] filename
|-a||Append the session record to filename, rather than overwrite it.|
|filename||The name of the file that you wish the results to be stored.|
Will log all results into the file myfile.txt. This will open a sub-shell and records all information through this session. The script ends when the forked shell exits (user types exit) or when CTRL-D is typed.
Note: If the script file is deleted during the script process the script still remains in memory however will not log the results.