history命令添加时间和使用技巧

1,添加显示时间 a,在/etc/profile 添加以下两行: HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S " export HISTTIMEFORMATshell      推荐:(或者显示用时间+ip+用户名bash USER_IP=`who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'`    H
相关文章
相关标签/搜索