{
    "mode": "man",
    "parameter": "SCRIPTREPLAY",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/SCRIPTREPLAY/1/json",
    "generated": "2026-05-30T06:05:07Z",
    "synopsis": "scriptreplay [options] [-t] timingfile [typescript [divisor]]",
    "sections": {
        "NAME": {
            "content": "scriptreplay - play back typescripts, using timing information\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "scriptreplay [options] [-t] timingfile [typescript [divisor]]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This program replays a typescript, using timing information to ensure that output happens in\nthe same rhythm as it originally appeared when the script was recorded.\n\nThe replay simply displays the information again; the programs that were run when the\ntypescript was being recorded are not run again. Since the same information is simply being\ndisplayed, scriptreplay is only guaranteed to work properly if run on the same type of\nterminal the typescript was recorded on. Otherwise, any escape characters in the typescript\nmay be interpreted differently by the terminal to which scriptreplay is sending its output.\n\nThe timing information is what script(1) outputs to file specified by --log-timing.\n\nBy default, the typescript to display is assumed to be named typescript, but other filenames\nmay be specified, as the second parameter or with option --log-out.\n\nIf the third parameter or --divisor is specified, it is used as a speed-up multiplier. For\nexample, a speed-up of 2 makes scriptreplay go twice as fast, and a speed-up of 0.1 makes it\ngo ten times slower than the original session.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-I --log-in",
                    "content": "File containing script's terminal input.\n",
                    "flag": "-I",
                    "long": "--log-in"
                },
                {
                    "name": "-O --log-out",
                    "content": "File containing script's terminal output.\n",
                    "flag": "-O",
                    "long": "--log-out"
                },
                {
                    "name": "-B --log-io",
                    "content": "File containing script's terminal output and input.\n",
                    "flag": "-B",
                    "long": "--log-io"
                },
                {
                    "name": "-t --timing",
                    "content": "File containing script's timing output. This option overrides old-style arguments.\n",
                    "flag": "-t",
                    "long": "--timing"
                },
                {
                    "name": "-T --log-timing",
                    "content": "This is an alias for -t, maintained for compatibility with script(1) command-line\noptions.\n",
                    "flag": "-T",
                    "long": "--log-timing"
                },
                {
                    "name": "-s --typescript",
                    "content": "File containing script's terminal output. Deprecated alias to --log-out. This option\noverrides old-style arguments.\n",
                    "flag": "-s",
                    "long": "--typescript"
                },
                {
                    "name": "-c --cr-mode",
                    "content": "Specifies how to use the CR (0x0D, carriage return) character from log files. The default\nmode is auto, in this case CR is replaced with line break for stdin log, because\notherwise scriptreplay would overwrite the same line. The other modes are never and\nalways.\n",
                    "flag": "-c",
                    "long": "--cr-mode"
                },
                {
                    "name": "-d --divisor",
                    "content": "Speed up the replay displaying this number of times. The argument is a floating-point\nnumber. It’s called divisor because it divides the timings by this factor. This option\noverrides old-style arguments.\n",
                    "flag": "-d",
                    "long": "--divisor"
                },
                {
                    "name": "-m --maxdelay",
                    "content": "Set the maximum delay between updates to number of seconds. The argument is a\nfloating-point number. This can be used to avoid long pauses in the typescript replay.\n",
                    "flag": "-m",
                    "long": "--maxdelay"
                },
                {
                    "name": "--summary",
                    "content": "Display details about the session recorded in the specified timing file and exit. The\nsession has to be recorded using advanced format (see script(1)) option --logging-format\nfor more details).\n",
                    "long": "--summary"
                },
                {
                    "name": "-x --stream",
                    "content": "Forces scriptreplay to print only the specified stream. The supported stream types are\nin, out, signal, or info. This option is recommended for multi-stream logs (e.g.,\n--log-io) in order to print only specified data.\n",
                    "flag": "-x",
                    "long": "--stream"
                },
                {
                    "name": "-V --version",
                    "content": "Display version information and exit.\n",
                    "flag": "-V",
                    "long": "--version"
                },
                {
                    "name": "-h --help",
                    "content": "Display help text and exit.\n",
                    "flag": "-h",
                    "long": "--help"
                }
            ]
        },
        "EXAMPLES": {
            "content": "% script --log-timing file.tm --log-out script.out\nScript started, file is script.out\n% ls\n<etc, etc>\n% exit\nScript done, file is script.out\n% scriptreplay --log-timing file.tm --log-out script.out\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "The original scriptreplay program was written by Joey Hess <joey@kitenet.net>. The program\nwas re-written in C by James Youngman <jay@gnu.org> and Karel Zak <kzak@redhat.com>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright © 2008 James Youngman\n\nCopyright © 2008-2019 Karel Zak\n\nThis is free software; see the source for copying conditions. There is NO warranty; not even\nfor MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\nReleased under the GNU General Public License version 2 or later.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "script(1), scriptlive(1)\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "For bug reports, use the issue tracker at https://github.com/karelzak/util-linux/issues.\n",
            "subsections": []
        },
        "AVAILABILITY": {
            "content": "The scriptreplay command is part of the util-linux package which can be downloaded from Linux\nKernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.\n\n\n\nutil-linux 2.37.2                            2021-07-20                              SCRIPTREPLAY(1)",
            "subsections": []
        }
    },
    "summary": "scriptreplay - play back typescripts, using timing information",
    "flags": [
        {
            "flag": "-I",
            "long": "--log-in",
            "arg": null,
            "description": "File containing script's terminal input."
        },
        {
            "flag": "-O",
            "long": "--log-out",
            "arg": null,
            "description": "File containing script's terminal output."
        },
        {
            "flag": "-B",
            "long": "--log-io",
            "arg": null,
            "description": "File containing script's terminal output and input."
        },
        {
            "flag": "-t",
            "long": "--timing",
            "arg": null,
            "description": "File containing script's timing output. This option overrides old-style arguments."
        },
        {
            "flag": "-T",
            "long": "--log-timing",
            "arg": null,
            "description": "This is an alias for -t, maintained for compatibility with script(1) command-line options."
        },
        {
            "flag": "-s",
            "long": "--typescript",
            "arg": null,
            "description": "File containing script's terminal output. Deprecated alias to --log-out. This option overrides old-style arguments."
        },
        {
            "flag": "-c",
            "long": "--cr-mode",
            "arg": null,
            "description": "Specifies how to use the CR (0x0D, carriage return) character from log files. The default mode is auto, in this case CR is replaced with line break for stdin log, because otherwise scriptreplay would overwrite the same line. The other modes are never and always."
        },
        {
            "flag": "-d",
            "long": "--divisor",
            "arg": null,
            "description": "Speed up the replay displaying this number of times. The argument is a floating-point number. It’s called divisor because it divides the timings by this factor. This option overrides old-style arguments."
        },
        {
            "flag": "-m",
            "long": "--maxdelay",
            "arg": null,
            "description": "Set the maximum delay between updates to number of seconds. The argument is a floating-point number. This can be used to avoid long pauses in the typescript replay."
        },
        {
            "flag": "",
            "long": "--summary",
            "arg": null,
            "description": "Display details about the session recorded in the specified timing file and exit. The session has to be recorded using advanced format (see script(1)) option --logging-format for more details)."
        },
        {
            "flag": "-x",
            "long": "--stream",
            "arg": null,
            "description": "Forces scriptreplay to print only the specified stream. The supported stream types are in, out, signal, or info. This option is recommended for multi-stream logs (e.g., --log-io) in order to print only specified data."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "Display version information and exit."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Display help text and exit."
        }
    ],
    "examples": [
        "% script --log-timing file.tm --log-out script.out",
        "Script started, file is script.out",
        "% ls",
        "<etc, etc>",
        "% exit",
        "Script done, file is script.out",
        "% scriptreplay --log-timing file.tm --log-out script.out"
    ],
    "see_also": [
        {
            "name": "script",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/script/1/json"
        },
        {
            "name": "scriptlive",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/scriptlive/1/json"
        }
    ]
}