linux history 想显示历史命令的时间和作者
时间:2021-06-18 19:17:27
收藏:0
阅读:28
vi ~/.profile
增加
HISTTIMEFORMAT="%F %T `whoami` `who am i|awk ‘{print $1,$5}‘|sed ‘s/ (/@/‘|sed ‘s/)//‘`"
然后 source ~/.profile
再执行history就有时间和作者了
原文:https://www.cnblogs.com/lizhaoyao/p/14899866.html
评论(0)