有了这个就可以一览无余linux操作了
export PROMPT_COMMAND='{ date "+[ %Y%m%d %H:%M:%S `whoami` `echo $SSH_CLIENT` `echo $SSH_TTY` ] `history 1 | { read x cmd; echo "$cmd"; }`"; } >> /var/log/messages'
有了这个就可以一览无余linux操作了
export PROMPT_COMMAND='{ date "+[ %Y%m%d %H:%M:%S `whoami` `echo $SSH_CLIENT` `echo $SSH_TTY` ] `history 1 | { read x cmd; echo "$cmd"; }`"; } >> /var/log/messages'