Re: bash history
On Thu, 2008-01-17 at 06:16 +0530, Raj Kiran Grandhi wrote:
> Vincent Lefevre wrote:
> > On 2008-01-17 05:37:34 +0530, Raj Kiran Grandhi wrote:
> >> set -o histappend
> >>
> >> appends the history file instead of overwriting it.
> >
> > $ set -o histappend
> > bash: set: histappend: invalid option name
>
> Sorry about that. It should be "shopt -s histappend"
>
>
> > But even if it can append commands, would bash do that *immediately*?
> > It seems that bash can save the history only when it exits.
>
> By immediately, do you mean writing to the history file after every
> command? I don't think it does that. That would exclude the option of
> ignoring duplicates, wouldn't it?
For bash:
My reading of the 'man bash' page is that there is a "history list" and
that that is written to .bash_history upon shell exit.
If you want to manipulate a live history list you should be using the
builtin 'fc' command.
Michael
Reply to: