本文介绍了无限的Bash历史的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要我的.bash_history的文件是无限的。例如所以,我总是可以回去看我如何建立/配置的东西,或者是什么漂亮的命令是,要不怎么有的命令打破东西星期前。我如何更改此设置?

I want my ".bash_history" file to be unlimited. e.g. So I can always go back and see how I built/configured something, or what that nifty command was, or how some command broke something weeks ago. How do I change this setting?

推荐答案

设置 HISTSIZE HISTFILESIZE 为空字符串:

HISTSIZE= HISTFILESIZE=

在你也可以使用 HISTSIZE = -1 HISTFILESIZE = -1

n.  Setting HISTSIZE to a value less than zero causes the history list to be
    unlimited (setting it 0 zero disables the history list).

o.  Setting HISTFILESIZE to a value less than zero causes the history file size
    to be unlimited (setting it to 0 causes the history file to be truncated
    to zero size).

这篇关于无限的Bash历史的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 01:54