bash history command

来源:互联网 发布:linux源码在线阅读 编辑:程序博客网 时间:2024/06/09 17:53

history -a(增加)

history -w(覆盖)

history -r (读取)

history -c(清除)



.bashrc的设定:

export HISTSIZE=1000000
export HISTFILESIZE=1000000
alias h="history"


HISTSIZE is the number of lines or commands that are stored in memory in a history list while your bash session is ongoing.

HISTFILESIZE is the number of lines or commands that (a) are allowed in the history file at startup time of a session, and (b) are stored in the history file at the end of your bash session for use in future sessions.

就是说HISTSIZE是bash seesion显示的最大条数,HISTFIESIZE是文件保存的最大条数。
0 0
原创粉丝点击