Untitled Document
script Command

script - this command lets you record your loging session in a file .The command will store all the key stroke as well as output and error message in a file . If we are doing some important work and wish to keep a log of all our activities , we should invoke this command immediately after we log in .The file with name typescript will be created under your current working directory . We can later view this file . To exit your script command session type or run exit command to terminate your script command recording

Example 1 - Basic Example

Run script command without any option and arguments aftre you login to your system .

   Script Started , file is typesccript     -------------------------- It will dispaly this message 

Example 2 - append your existing file ( -a ) option

You can append your existing file by executing script command with -a option

   script -a typecript     

Example 3 - storing your script command o/p in own file

You can store your script command session in your own file , just invoke script commad with file name . The below command will store the script sessions in log.txt file

   script log.txt     
Untitled Document