LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ttyrec

Record terminal sessions with timing

TLDR

Record terminal session to default file (ttyrecord)
$ ttyrec
copy
Record to a specific file
$ ttyrec [path/to/recording.tty]
copy
Append to an existing recording
$ ttyrec -a [path/to/recording.tty]
copy
Record a specific command instead of the default shell
$ ttyrec -e [command] [path/to/recording.tty]
copy
Record with automatic uudecode for file transfers
$ ttyrec -u [path/to/recording.tty]
copy

SYNOPSIS

ttyrec [-a] [-u] [-e command] [file]

DESCRIPTION

ttyrec is a terminal session recorder that captures all terminal output with microsecond timing accuracy. It is derived from the script(1) command but adds precise timing information essential for accurate playback.When invoked, ttyrec spawns a new shell (or the command specified with -e) and records all output until the shell exits. The recording includes timing data that allows ttyplay to reproduce the session at the original speed, making it ideal for creating tutorials, demonstrations, or documenting terminal procedures.The shell used is determined by the SHELL environment variable, falling back to /bin/sh if not set. Recordings can be played back with ttyplay and their duration checked with ttytime.

PARAMETERS

-a

Append output to the file rather than overwriting it.
-u
Automatically call uudecode(1) and save its output when uuencoded data appears in the session. Useful for transferring files from remote hosts.
-e command
Execute the specified command instead of the default shell when ttyrec starts.
file
Output file for the recording. Defaults to "ttyrecord" in the current directory.

CAVEATS

Recordings may contain sensitive information like passwords if not careful. The recording format is not human-readable and requires ttyplay for playback. Large recordings can consume significant disk space depending on session activity. Terminal dimensions at playback should match recording for proper display.

HISTORY

ttyrec was originally developed by Satoru Takabayashi in the early 2000s in Japan. It became popular in the Unix community for creating terminal demonstrations and tutorials. An enhanced version (ovh-ttyrec) was later developed by OVH with additional features like locking and real-time streaming support.

SEE ALSO

ttyplay(1), ttytime(1), script(1), asciinema(1)

Copied to clipboard
Kai