vi ~/.profile

增加

HISTTIMEFORMAT="%F %T `whoami` `who am i|awk '{print $1,$5}'|sed 's/ (/@/'|sed 's/)//'`"

然后  source ~/.profile 

再执行history就有时间和作者了

相关文章: