script

Official Description

Makes a transcript of the terminal session.

Syntax

script [-a] [file]

Options

-a appends the transcript to an existing file rather than writing it to a new file (or clobbering the existing file).

Oddities

Writes to a file named typescript by default.

If you do not specify the -a option and the file exists, it is clobbered.

Be sure to terminate your script session with an exit command. A script session left on inadvertently will eventually tie up large amounts of disk space.

Example

 $ script # Start screen capture Script started, file is typescript $ ps PID TTY S TIME CMD 725 console I + 0:00.02 /usr/sbin/getty console console vt100 775 pts/1 S 0:00.10 -ksh (ksh) 2729 pts/1 S + 0:00.00 script 2730 pts/1 S + 0:00.00 ...

Get Korn Shell Programming by Example 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.