linux历史命令 [英] linux history command
本文介绍了linux历史命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果输入历史记录命令,则只能查看1000行.我想看的不止于此.如果我可以查看在某些日期或月份之间键入的所有命令,那将是很好的.
If I type history command, I can view only 1000 lines. I want to view more than that. It will be nice If I can view all commands typed between certain dates or months.
这可能吗?如果是这样,该怎么做?
Is this possible? If so, how to do this?
推荐答案
您要在.bashrc
中设置bash变量HISTSIZE
和HISTFILESIZE
.
You want to set the bash variables HISTSIZE
and HISTFILESIZE
in your .bashrc
.
HISTSIZE
确定历史记录中保留了多少条命令. HISTFILESIZE
确定要在其中保存历史记录的行中存储的行数,通常为.bash_history
.
HISTSIZE
determines how many comands are retained in history. HISTFILESIZE
determines how many lines of history are stored in the file in which they are persisted, usually .bash_history
.
这篇关于linux历史命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文