script

Format:

script option file 

Option:

-a Append the output to a file

You can create a complete history of your session by using script. Simply invoke it at the command line. Script will terminate when you exit your session. Script copies what you type and appends it to a file.

					$ script mylogin
				

will start the script session and log everything to the file mylogin.

Get Linux and Unix Shell Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.