Help tweaking .bash_history, please!
Hi there, I'm trying to configure history logging in .bash_history (under Red Hat EL 5.5). I want to save 2000 command entries for user root and leave a default of 20 for the rest of the users in the system. I wrote the following line in the /etc/profile file: export HISTSIZE=20 Besides, I've put the following in .bashrc file in root user's home: export HISTSIZE=2000 export HISTFILESIZE=2000 export HISTTIMEFORMAT='%F %T ' export HISTFILE=~/.bash_history shopt -s histappend readonly PROMPT_COMMAND="history -a" I don't know what is happening but that configuration isn't working as i expected. I want to log 2000 lines in .bash_history for the user root, no matter the number of sessions opened and that file resetting every time i logout & login. How can i fix that? I don't want the history file to reset with each root login. Regards. |
No comments:
Post a Comment