Linux command
ttyrec 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Record terminal session
ttyrec
Record to a specific file
ttyrec [path/to/recording.tty]
Append to an existing recording
ttyrec -a [path/to/recording.tty]
Record a specific command
ttyrec -e [command] [path/to/recording.tty]
Record with automatic uudecode
ttyrec -u [path/to/recording.tty]
说明
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.
参数
- -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.
FAQ
What is the ttyrec command used for?
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.
How do I run a basic ttyrec example?
Run `ttyrec` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a do in ttyrec?
Append output to the file rather than overwriting it.