Annotation of doc/techtips/record_shell_commands.txt, revision 1.1

1.1     ! harris41    1: Better recording of shell commands
        !             2: 
        !             3: GOAL: Keep track of the time of shell command execution
        !             4: and do not lose command history.
        !             5: 
        !             6: The following solution works well for me
        !             7: on many of my servers.
        !             8: 
        !             9: 1. cp /etc/profile /etc/profile.orig
        !            10: 2. Edit /etc/profile
        !            11: 3. diff /etc/profile /etc/profile.orig
        !            12: [root@zaphod root]# diff /etc/profile /etc/profile.orig 
        !            13: 32,36c32
        !            14: < HISTSIZE=1000000000
        !            15: < HISTFILESIZE=1000000000
        !            16: < HISTDATE=`date`
        !            17: < 
        !            18: < echo "Commands below this line occur after $HISTDATE" >> $HOME/.bash_history
        !            19: ---
        !            20: > HISTSIZE=1000
        !            21: 42c38
        !            22: < export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTFILESIZE INPUTRC
        !            23: ---
        !            24: > export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
        !            25: 
        !            26: NOTE: /etc/profile is many times called twice, so there are two
        !            27: lines "Commands below this line"... entered into .bash_history.
        !            28: 
        !            29: This is the best solution I have found aside from altering
        !            30: the bash source code and recompiling bash.
        !            31: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>