AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
  • 1.  CAPTURE COMMANDS

    Posted Mon March 10, 2008 02:47 AM

    Originally posted by: SGLFORUM


    Hi,

    How to capture the commands issued (as soon as the command is entered) in korn shell for a session?

    Thanks,
    #AIX-Forum


  • 2.  Re: CAPTURE COMMANDS

    Posted Mon March 10, 2008 09:09 AM

    Originally posted by: esv


    you can capture the whole session using script...

    script session_log.txt

    command1
    command2
    command3
    exit

    cat session_log.txt and you'll get all commands and their output.

    If you are only interested in the commands issued, check the history file...

    in your .profile or /etc/profile setup something like this..

    export HISTSIZE=2000
    export HISTFILE=~/myhistory.log

    then as you execute commands, they will be stored there.

    best regards,
    esv.
    #AIX-Forum


  • 3.  Re: CAPTURE COMMANDS

    Posted Wed March 12, 2008 05:22 AM

    Originally posted by: IBMFORUMS


    you can do this from the your PC.
    just configure PUTTY or any SSH client to log the session to a file. then, once you close the session, you will find your activities has been saved in this file.
    #AIX-Forum