linux历史命令 [英] linux history command

查看:114
本文介绍了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变量HISTSIZEHISTFILESIZE.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆