根据IP分别审计Linux远程用户历史命令

来源:互联网 发布:淘宝一定要搜的店子 编辑:程序博客网 时间:2024/05/22 07:43

往.bashrc里加行
HISTFILE=.bash_history_$(w | grep `ps|grep ps|awk '{print $2}'`|awk '{print $3}')

让每个IP来的.bash_history变成.bash_history_IP