优化history记录信息
1.修改添加/etc/profile内容
cat <> /etc/profile ##优化history记录历史 export HISTTIMEFORMAT="%F %T\`who -u am i 2>/dev/null| awk '{print \$NF}'|sed -e 's/[()]//g'\` \`whoami\` " EOF
2.展示效果
id 日期 时间 ip 用户 命令
1.修改添加/etc/profile内容
cat <> /etc/profile ##优化history记录历史 export HISTTIMEFORMAT="%F %T\`who -u am i 2>/dev/null| awk '{print \$NF}'|sed -e 's/[()]//g'\` \`whoami\` " EOF
2.展示效果
id 日期 时间 ip 用户 命令