scriptreplay command in Linux with Examples

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.



My Personal Notes arrow_drop_up

Blogger, Linux lover, Tech enthusiast, Engineer

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.