Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Clear the terminal's command history' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Clear the terminal's command history
Authored by: baddog on Mar 23, '04 06:22:49PM

To get it to work for you, you might need to log out and back in. bash_profile is only read at login time. Alternatively, you can put it in your ~/.bashrc file (read whenever a new shell is opened). It is redundant to set env variables everytime you start a new shell, but I do it often because it's convenient and guaranteed to work right away.

To make bash *erase* your history file every time you quit the shell, you should try this instead of unsetting HISTFILE:

export HISTFILESIZE=0



[ Reply to This | # ]