04 February 2012

Record Session Using script Command in Linux

2 comments

Record Session Using script Command in Linux

script command can be used to record the everything that typed on the terminal.

Syntax

Script filename

*All the record recorded to the filename , if no filename specified record is recorded to the file called typescript.

Example






*Now what ever you type will be store in file record.txt

How to stop recording

Press ctrl+d or type exit 









How to view Recorded File

1. You can cat that file
$ cat record.txt

2.You can open the file with any text editor
$ vi record.txt


I want to record next session in the same file

Enter the following command in terminal to record session in record.text

$ script -a record.txt

If You Liked This Post Please Take a Time To Share This Post

You May Also Like...

2 comments: