Can I increase the size of the command history in bash?
Note that I use a Red Hat Linux computer in the undergraduate astrophysics department here (so I don't get that many privileges).
|
Can I increase the size of the command history in bash? Note that I use a Red Hat Linux computer in the undergraduate astrophysics department here (so I don't get that many privileges). |
||||
|
Instead of specifying numbers, you can do
in which case only your disk size (and your "largest file limit", if your OS or FS has one) is the limit. However, be aware that this will eventually slow down bash more and more. see here and here for better ways. |
|||
|
|
|
You can use logrotate to preserve old entries. It allows you, for example, to set size limits that will trigger archiving. It is normally run from a daily cronjob, but you might just as well invoke it from your |
|||
|
|
|
@Philomath, unsetting those environment vars does not work for me at all! For me, this causes bash to use its inbuilt defaults (it seems) of truncating .bash_history to about 9KiB. What does work for me is the following in my .bashrc:
|
|||
|
|
15 Examples To Master Linux Command Line History– Prince John Wesley Jul 29 '11 at 4:45