linux history记录格式修改
生活随笔
收集整理的這篇文章主要介紹了
linux history记录格式修改
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
#保存一萬條命令記錄 sed -i 's/^HISTSIZE=1000/HISTSIZE=10000/g' /etc/profile#在/etc/profile的文件尾部添加如下行數(shù)配置信息 ######jiagu history xianshi######### USER_IP=`who -u am i 2>/dev/null | awk '{print $NF}' | sed -e 's/[()]//g'` if [ "$USER_IP" = "" ] then USER_IP=`hostname` fi export HISTTIMEFORMAT="%F %T $USER_IP `whoami` " shopt -s histappend export PROMPT_COMMAND="history -a" ######### jiagu history xianshi ########## source /etc/profile
?
轉(zhuǎn)載于:https://www.cnblogs.com/pythonal/p/10142409.html
總結(jié)
以上是生活随笔為你收集整理的linux history记录格式修改的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【Visual Studio 扩展工具】
- 下一篇: 1元红包换雪诺亏吗