script - make typescript of terminal session
script [-a] [-F secs] [file]
The script(1) utility makes a typescript of everything printed on your terminal. It is useful for users, such as students, who need a hardcopy record as proof of an interactive session; the typescript file can be printed out later with lp(1).
If the argument file is given, script(1) saves all dialog in file. If no file name is given, the typescript is saved in the file typescript.
Options are as follows:
The script ends when the forked shell exits. (To exit sh(1) on Interix systems, use CTRL+D; to exit csh(1), use exit(1), logout(1), or, if ignoreeof is not set, use CTRL+D.)
Certain interactive commands, such as vi(1), create garbage in the typescript file. The script(1) utility works best with commands that do not manipulate the screen; the results are meant to emulate a hardcopy terminal.
The following environment variable is utilized by script(1):
The script(1) utility places everything in the log file, including linefeeds and backspaces. This might not be what an inexperienced user expects.
csh(1) (for the history mechanism)