首页 > 其他 > 详细

history优化设置

时间:2015-10-13 10:37:08      阅读:216      评论:0      收藏:0      [点我收藏+]

编辑/etc/profile文件或者/etc/bashrc文件,添加如下内容

export HISTFILE=$HOME/.bash_history
export HISTSIZE=2000
export HISTFILESIZE=2000
export HISTTIMEFORMAT="%F %T `whoami` "
export PROMPT_COMMAND="history -a; history -c; history -r;"
shopt -s histappend
typeset -r PROMPT_COMMAND
typeset -r HISTTIMEFORMAT ‘ > /etc/profile.d/history.sh

重新连接终端,即可

history优化设置

原文:http://www.cnblogs.com/txqz/p/4873535.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!