delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/06/12:31:50

Date: Mon, 6 Jul 1998 19:30:50 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Jeff Williams <jeffw AT darwin DOT sfbr DOT org>
cc: djgpp AT delorie DOT com
Subject: Re: Updating history file under BASH
In-Reply-To: <199807061512.KAA24628@kendall.>
Message-ID: <Pine.SUN.3.91.980706192904.28501E-100000@is>
MIME-Version: 1.0

On Mon, 6 Jul 1998, Jeff Williams wrote:

> Since I work almost exclusively under bash, the command history doesn't
> get saved at all unless I remember to exit bash before shutting down.
> Is there a way to have my command history regularly witten to the
> ~/_history file from within bash?

According to the Bash manual (hint, hint ;-), the command "history -a" 
will append the current history to the history file; "history -w" will 
overwrite it.

It should be fairly simple to arrange this command to be issued during 
logout in your _bash_logout or some such file.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019