Name

script

Synopsis

script [option] [file]

Fork the current shell and make a typescript of a terminal session. The typescript is written to file. If no file is given, the typescript is saved in the file typescript. The script ends when the forked shell exits, usually with Ctrl-D or exit.

Options

-a

Append to file or typescript instead of overwriting the previous contents.

-c command

Run the specified command instead of an interactive shell.

-f

Flush output after each write. Useful if another person is monitoring the output file.

-q

Operate in quiet mode.

-t

Write timing data to standard error. Each entry has two fields: the first is the elapsed time since the last output, and the second is the number of characters in the current output.

Get Linux in a Nutshell, 6th Edition 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.