Recording a terminal session: script

script [-a] [ filename ]

The command

script

makes a record of everything printed on your screen in a file called typescript. To stop recording, type CTRL/D.

To specify a different file for the recording, type

script name

where name is the name of the file that you wish to use.

Use the -a option if you want to append the recording to a file rather than overwriting it.