OS Manuals

/usr/bin/script

make typescript of terminal session

From script 2.42.4-r2 (os), captured 2026-11-05 by running script --help (exit 0). permalink

Usage:
 script [options] [<file>] [-- <command> [<argument>...]]

Make a typescript of a terminal session.

Options:
 -I, --log-in <file>           log stdin to file
 -O, --log-out <file>          log stdout to file (default)
 -B, --log-io <file>           log stdin and stdout to file

 -T, --log-timing <file>       log timing information to file
 -t[<file>], --timing[=<file>] deprecated alias to -T (default file is stderr)
 -m, --logging-format <name>   force to 'classic' or 'advanced' format

 -a, --append                  append to the log file
 -c, --command <command>       run <command> rather than an interactive shell
                                 (alternative to '-- <command> [<argument...>]')
 -e, --return                  return exit code of the child process
 -f, --flush                   run flush after each write
     --force                   use output file even when it is a link
 -E, --echo <when>             echo input in session (auto, always or never)
 -o, --output-limit <size>     terminate if output files exceed size
 -q, --quiet                   be quiet

 -h, --help                    display this help
 -V, --version                 display version

Arguments:
 Values for <size> may be followed by a suffix: KiB, MiB,
 GiB, TiB, PiB, EiB, ZiB, or YiB (where the "iB" is optional).

For more details see script(1).
Options (16)
OptionDescriptionSource
-I, --log-in fileLog input to the file.help + man
-O, --log-out filelog stdout to file (default)help + man
-B, --log-io fileLog input and output to the same file.help + man
-T, --log-timing fileLog timing information to the file.help + man
-m, --logging-format nameForce use of advanced or classic timing log format.help + man
-a, --appendAppend the output to file or to typescript, retaining the prior contents.help + man
-c, --command commandrun <command> rather than an interactive shell (alternative to '-- <command> [<argument...>]')help + man
-e, --returnReturn the exit status of the child process.help + man
-f, --flushFlush output after each write.help + man
--forceAllow the default output file typescript to be a hard or symbolic link.help + man
-E, --echo whenThis option controls the ECHO flag for the slave end of the session’s pseudoterminal.help + man
-o, --output-limit sizeLimit the size of the typescript and timing files to size and stop the child process after this size is exceeded.help + man
-q, --quietBe quiet (do not write start and done messages to standard output).help + man
-h, --helpDisplay help text and exit.help + man
-V, --versionDisplay version and exit.help + man
-t, --timing fileOutput timing data to standard error, or to file when given. (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.