Linux 配置 history 命令顯示操做時間、用戶和登陸 IP

1、在配置文件中(/etc/bashrc 或者 /etc/profile 或者~/.bash_profile 或者 ~/.bashrc)添加以下配置node HISTFILESIZE=4000 #默認保存命令是1000條,這裏修改成4000條 HISTSIZE=4000 USER_IP=`who -u am i 2>/dev/null| awk '{print $NF}'|s
相關文章
相關標籤/搜索