• How to increase max size of .bash_history

    Bash history size is specified in HISTSIZE environment variable ,So if you want to increase the size of history ,you have to increase the value of HISTSIZE .

    To know the current size :

    echo $HISTSIZE && echo $HISTFILESIZE

    To increase the size to 10000 :

    echo -e 'export HISTSIZE=10000 nexport HISTFILESIZE=10000' >>~/.bash_profile
    echo -e 'export HISTSIZE=10000 nexport HISTFILESIZE=10000' >>/etc/profile

    Categories: Linux

    Comments are currently closed.