Ubuntu: Are the HISTSIZE and HISTFILESIZE generic or specific to .bash_history



Question:

How to change history size for ever?

So I wanted to add a follow up question to this post but wasn't sure if posting on it was allowed or would be useful since its so old.

My question is does setting the HISTSIZE and HISTFILESIZE work for all files?

I have a .bash_history and a psql_history and I want both to keep large chunks (10000 entries) of my records does setting the size in my .bashrc do this?


Solution:1

HISTFILE and HISTFILESIZE are bash specific (some other shells might also support the same/similar environment variables e.g. zsh supports HISTFILE and uses SAVEHIST instead of HISTFILESIZE) and dictates bash's interactive history, by default; it would not work for psql CLI's history.

Look out for any such specific directive that psql provides, and that you can set on any startup configuration file, or via an environment variable, or may be via command line.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »