现在的位置: 首页 > 综合 > 正文

bash history command

2017年11月13日 ⁄ 综合 ⁄ 共 459字 ⁄ 字号 评论关闭

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是文件保存的最大条数。

抱歉!评论已关闭.