Is there a way to define an unlimited history in Bash ?

link|improve this question

8% accept rate
feedback

migrated from stackoverflow.com May 4 '10 at 12:06

This question came from our site for professional and enthusiast programmers.

3 Answers

Have you googled it?

Go into your .bash_profile now and add these lines

HISTFILESIZE=1000000000

HISTSIZE=1000000

Linux Tips: take control of your bash_history

link|improve this answer
18  
It should be noted that 1000000000 is only equal to infinity for very small values of infinity. – sepp2k May 4 '10 at 12:06
2  
I've upvoted this answer but I think the only way to have truly unlimited history in bash is to modify the source, compile your own copy and buy unlimited disk space. – Doug Harris May 4 '10 at 13:52
+1 to Doug Harris for unlimited disk space; a truly unlimited system will take up all disk space. – Kevin M May 5 '10 at 3:50
Just for the record: "Google" is never a valid response to a question in any way: meta.stackoverflow.com/questions/8724/… – Bobby May 6 '10 at 10:14
feedback

A different concept (may not be applicable) but you can have unlimited history when using shell-sink.

link|improve this answer
feedback

Yeah I don't think there is any way to have an 'unlimited' history, but doing as aioobe says should do the trick (although you may put it in .bashrc, either way would be fine) then simply restart bash or do source ~/.bashrc and check with set | grep HIST

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.