Re: Where is the history stored (bash)?
- From: "Chris F.A. Johnson" <cfajohnson@xxxxxxxxx>
- Date: Mon, 23 Jan 2006 17:56:09 -0500
On 2006-01-23, bob the builder wrote:
>> > say for example I wanted to clear my history for my current session
>> > only, so that it doesn't end up in ~/.bash_history, how do I?
> I think I figured out this part, if you:
> unset HISTFILE
> the shell will not write to ~/.bash_history when your session
That doesn't clear your history; it prevents bash from writing it
to your history file when you log out.
> "If HISTFILE is unset, or if the history file is unwritable, the
> history is not saved."
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence