EXTENDED HISTORY SEPARATELY FOR EACH USER:
HISTSIZE = Maximum size of the history file
HISTFILE = Location/filename used to record commands executed.
vi /etc/profile:
###Secondary Logging Start### From="`/usr/bin/who am i | awk '{ print $1 }'`" To="`/usr/bin/whoami | awk '{ print $1 }'`" File="$From:$To" if [ ! -d /var/adm/history/$To ] then mkdir -p /var/adm/history/$To chmod 700 /var/adm/history/$To export HISTFILE=/var/adm/history/$To/.sh_history.$File export EXTENDED_HISTORY=ON export HISTSIZE=10000 export HISTDATEFMT=%d-%m-%y.%H:%M:%S alias smit='smit -l ~${HOME}/smit.log.${From}.$(date +"%d-%m-%y.%H:%M") -s ~${HOME}/smit.script.${From}.$(date +"%d-%m-%y.%H:%M")' alias smitty='smitty -l ~${HOME}/smit.log.${From}.$(date +"%d-%m-%y.%H:%M") -s ~${HOME}/smit.script.${From}.$(date +"%d-%m-%y.%H:%M")' fi