linux history 想显示历史命令的时间和作者
vi ~/.profile
增加
HISTTIMEFORMAT="%F %T `whoami` `who am i|awk '{print $1,$5}'|sed 's/ (/@/'|sed 's/)//'`"
然后 source ~/.profile
再执行history就有时间和作者了
vi ~/.profile
增加
HISTTIMEFORMAT="%F %T `whoami` `who am i|awk '{print $1,$5}'|sed 's/ (/@/'|sed 's/)//'`"
然后 source ~/.profile
再执行history就有时间和作者了
