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
相關文章
相關標籤/搜索