centos history显示命令执行时间、执行用户,执行IP

在/etc/profile的最后添加以下部分:html   USER_IP=`who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'`   export HISTTIMEFORMAT="[%F %T][`whoami`][${USER_IP}] "    重载:source /etc/profile 转载于:https://www
相关文章
相关标签/搜索