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.
scriptreplay [-t] timingfile [typescript] [divisor]
Example: To replay a recorded script with script filename as geeksforgeeks and timing output file as time_log.
- -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.
The replay speed will increase by twice.
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.
Please Login to comment...