标签:nod 同步 指定 man tmp his mod comm read
[root@node1 tmp]# vi /etc/profile
export PROMPT_COMMAND=‘{ msg=$(history 1 | { read x y; echo $y; });echo "[euid=$(whoami)]":$(who am i):[`pwd`]#"$msg" >>/tmp/history_cmd.log; }‘
[root@node1 tmp]# . /etc/profile
[root@node1 tmp]# chmod 777 history_cmd.log
[root@node1 tmp]# chattr +a history_cmd.log
标签:nod 同步 指定 man tmp his mod comm read
原文地址:https://www.cnblogs.com/qqran/p/11668105.html