Copying your screen to a file (capture and script commands)
Use the capture command, which emulates a VT100 terminal, to copy everything printed on your terminal to a file that you specify. Use the script command to copy everything printed on your terminal to a file that you specify, without emulating a VT100 terminal.
Both commands are useful for printing records of terminal dialogs.
For example, to
capture the screen of a terminal while emulating a VT100, at the prompt, type the
following:
capture screen.01
The system displays information similar to
the
following:
Capture command is started. The file is screen.01.
Use ^P to dump screen to file screen.01.
You are now emulating a vt100 terminal.
Press Any Key to continue.
After entering data and dumping the screen contents, stop the
capture command by pressing Ctrl-D or typing exit and
pressing Enter. The system displays information similar to the
following:
Capture command is complete. The file is screen.01.
You are NO LONGER emulating a vt100 terminal.
Use the cat command to display the contents of your file.
For example, to
capture the screen of a terminal, at the prompt, type the
following:
script
The system displays information similar to the
following:
Script command is started. The file is typescript.
Everything displayed on the screen is now copied to the typescript file.
To stop the
script command, press Ctrl-D or type exit and press Enter.
The system displays information similar to the
following:
Script command is complete. The file is typescript.
Use the cat command to display the contents of your file.