Open In App

scriptreplay command in Linux with Examples

Improve
Improve
Like Article
Like
Save
Share
Report

scriptreplay command is used to replay a typescript/terminal_activity stored in the log file that was recorded by the script command. With the help of timing information, the log files are played and the outputs are generated in the terminal with the same speed the original script was recorded. The replay does not run the command again but it only displays the same information once again, thus scriptreplay must be run on the same type of terminal the typescript was recorded in order to work properly.
By default, the replay displays the information stored in typescript file if no other filename is specified.

Syntax:

scriptreplay [-t] timingfile [typescript] [divisor]

Example: To replay a recorded script with script filename as geeksforgeeks and timing output file as time_log.

Options:

  • -t, –timing: This option is used for script timing output file.

    Example: To replay the script timing file, time_log.

  • -s, –typescript: This option is used for script terminal session output file.

    Example: To replay the script namely geeksforgeeks using -s option.

  • -d, –divisor: This option is used when we want to speed up or slow down execution with time divisor. The argument here is a floating point number.

    Example 1: To replay the script, geeksforgeeks with 2x speed we will use 2 as a divisor.

    Input:

    The replay speed will increase by twice.

    Output:

    Example 2: To replay the script, geeksforgeeks with 2 times slower we will use 0.2 as a divisor.

  • -V, –version: Output version information and exit.

  • -h, –help: Display this help and exit.


Last Updated : 17 Apr, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads