shantiq
August 8th, 2013, 09:03 AM
Like many in Ubuntu i use the amazing
incremental history searching (http://codeinthehole.com/writing/the-most-important-command-line-tip-incremental-history-searching-with-inputrc/)
Now I have noticed over a few years that the entire bash history gets wiped out from time to time rendering the incremental search null and void; having to start all over again and remembering commands :KS
Reading around it seems when it get to a certain numbers it wipes out all the history
Am I right in thinking that?
and using
gedit ~/.bashrc and finding
HISTSIZE=1000
HISTFILESIZE=2000 you will see the numbers are set quite low
I understand when it reaches one of those numbers it will WIPE all memory of previous history
so to set them much higher say
HISTSIZE=100000
HISTFILESIZE=200000 and then enter
. ~/.bashrc should keep me happy until next OS clean upgrade
But surely there must be a way to set it to infinite so your incremental history search is ALWAYS secure
i found this (http://www.cyberciti.biz/faq/clear-the-shell-history-in-ubuntu-linux/#comment-96800) online to do the reverse [ie keep no history]
Prevent a bash history file from ever being saved
Add the following commands to ~/.bashrc file:
echo 'unset HISTFILE' >> ~/.bashrc
echo 'export LESSHISTFILE="-"' >> ~/.bashrc
so there must be an equivalent command to do what it is i wish for: ie unlimited bash history
Might some of you know what it is please?
incremental history searching (http://codeinthehole.com/writing/the-most-important-command-line-tip-incremental-history-searching-with-inputrc/)
Now I have noticed over a few years that the entire bash history gets wiped out from time to time rendering the incremental search null and void; having to start all over again and remembering commands :KS
Reading around it seems when it get to a certain numbers it wipes out all the history
Am I right in thinking that?
and using
gedit ~/.bashrc and finding
HISTSIZE=1000
HISTFILESIZE=2000 you will see the numbers are set quite low
I understand when it reaches one of those numbers it will WIPE all memory of previous history
so to set them much higher say
HISTSIZE=100000
HISTFILESIZE=200000 and then enter
. ~/.bashrc should keep me happy until next OS clean upgrade
But surely there must be a way to set it to infinite so your incremental history search is ALWAYS secure
i found this (http://www.cyberciti.biz/faq/clear-the-shell-history-in-ubuntu-linux/#comment-96800) online to do the reverse [ie keep no history]
Prevent a bash history file from ever being saved
Add the following commands to ~/.bashrc file:
echo 'unset HISTFILE' >> ~/.bashrc
echo 'export LESSHISTFILE="-"' >> ~/.bashrc
so there must be an equivalent command to do what it is i wish for: ie unlimited bash history
Might some of you know what it is please?