linux 記錄用戶登陸日誌與命令執行日誌

vi /etc/profile 在末尾增長代碼web history USER=`whoami` USER_IP=`who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'` if [ "$USER_IP" = "" ]; then USER_IP=`hostname` fi if [ ! -d /var/log/history ]
相關文章
相關標籤/搜索