Linux history记录添加命令执行时间、用户、IP
时间:2021-07-15 18:58:19
收藏:0
阅读:32
在/etc/profile最后添加以下命令:
export HISTTIMEFORMAT="%F %T `who am i | awk ‘{ print $1 $5 }‘` "

清除本次会话history:
history -r
原文:https://www.cnblogs.com/xingfuxiaokong/p/15016184.html
评论(0)