linux history格式定制

将以下内容写入profile或者新建文件,source生效即可

export HISTFILE=$HOME/.bash_history
export HISTSIZE=1200
export HISTFILESIZE=1200
export HISTCONTROL=ignoredups
export HISTTIMEFORMAT="`whoami` %F %T "
shopt -s histappend
typeset -r HISTTIMEFORMAT

你可能感兴趣的:(linux history格式定制)