[NTLUG:Discuss] Re: Discuss Digest, Vol 8, Issue 57

Kyle_Davenport@compusa.com Kyle_Davenport at compusa.com
Wed Aug 27 10:14:07 CDT 2003


On Mon, 2003-08-25 at 15:18, Richard Geoffrion wrote:
> To keep your bash history from being recorded during a session, one can
> issue the command  'unset HISTFILE' before exiting.
>
> HOWEVER, when one has MULTIPLE terminal windows opened up, only that last
> one to close seems to save its HISTFILE information into the bash
history.
>
> Is there a way to force a write to the bash history as one exits each
shell
> so that the entire history of all bash sessions are recorded?   Could
this
> be automated in the logout/logoff process?

That is the default behavior (each shell appends its history to
~/.bash_history when I exit it).  It has always worked for me.   Are you
opening separate terminal windows are forking daughter process bash shells?

You can play with ~/.bash_logout, which executes when bash exits.  "cd &&
sort -u .bash_history > save && mv save .bash_history" ?





More information about the Discuss mailing list