Linux Operating System (MOSC)

MOSC Banner

How to increase the command history size?

Hi,

I can see Oracle Linux has default 1000 lines of command history.

How to increase the size. Is it the same method as RedHat that use HISTSIZE and HISTFILESIZE variables?

I will add the following files into user's /home/user/.bashrc file.


HISTSIZE=10000

HISTFILESIZE=1000000

shopt -s histappend

export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"


The above four lines I used in RedHat Linux.

Thanks

Xiaogang

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center