Tip 1

Record Eveything Printed on Your Terminal Screen.

            $ script -a <filename>

     Now start doing stuff and "everything" is appended to <filename>.
     For example

            $ script installation

            $ (command)

            $ (result)

            $ ...

            $ ...

            $ (command)

            $ (result)

            $ exit

     The whole session log is in the installation file that you can later
     read and/or cleanup and add to a documentation.

     This command can also be used to redirect the contents to another
user,
     but you must be root to do this.

     Step 1 - find out what pts they are using.

            $ w

     Step 2 - Run script on that pts. After running this command below
              everything you type will appear on their screen.

            $ script /dev/pts/4



TIP 2:

     script -f with mkfifo to allow another user to view what you type
          in real-time.


        Step 1.  Create a fifo (first in first out) file that the other
              user can view. For this example create the file
/tmp/scriptout

               [chir...@laptop ~]$ mkfifo /tmp/scriptout

        Step 2.  Have the second user, voyeur user, cat this file.
Output will block
              for them until you complete step 3. The other user, voyer,
              is executing the command below.
 
               [voy...@laptop ~]$ cat /tmp/scriptout

        Step 3.  The original user runs the following command.

               [chir...@laptop ~]$ script -f  /tmp/scriptout
               Script started, file is /tmp/scriptout

             Now anything typed, including a vi session, will be
displayed to the
             voyeur user in step 2.  



Reply via email to