#### vim /etc/profile
USER_IP=`who -u am i | awk '{print $NF}'|sed -e 's/[()]//g'`
if [ -z "$USER_IP" ]
then
USER_IP="NO_client_IP"
fi
export HISTTIMEFORMAT="[%Y.%m.%d %H:%M:%S-$USER_IP-$USER]"
export HISTSIZE=3000
source /etc/profile
Centos设置历史命令增加时间 用户 IP地址
阅读 63
2022-01-09
#### vim /etc/profile
USER_IP=`who -u am i | awk '{print $NF}'|sed -e 's/[()]//g'`
if [ -z "$USER_IP" ]
then
USER_IP="NO_client_IP"
fi
export HISTTIMEFORMAT="[%Y.%m.%d %H:%M:%S-$USER_IP-$USER]"
export HISTSIZE=3000
source /etc/profile
相关推荐
精彩评论(0)