Terminal Recording with script and scriptreplay command

Learn how to do terminal recording with script and scriptreplay command.It is one of the useful command to record the activities on terminal. Morever after recording the terminal session you can play the session activity with the help of scriptreplay command.

 root@tuxworld:~# script -t 2>sample.time sample.log
Script started, file is sample.log

The script will start and record the commands and activities running on terminal.
Here sample.time keeps the information of time.
and sample.log is the log file for recording terminal session.

Use exit command to stop the terminal recording.

 root@tuxworld:~# exit
Script done, file is sample.log

To run the recorded terminal use the below command.

root@tuxworld:~# scriptreplay sample.time sample.log