Terminal: save history?
Biju Chacko
botsie at xfce.org
Mon Jul 17 16:21:29 CEST 2006
On Mon, 17 Jul 2006 17:50:01 +0530, Mike Massonnet <mmassonnet at gmail.com>
wrote:
> Mon, 17 Jul 2006 10:57:37 +0200 - Benjamin Winkel <uzspde at uni-bonn.de>
> wrote :
>
>> I know that
>> e.g. the bash uses a file ".bash_history". But this is only updated
>> if I close one instance and only the commands of the closed terminal
>> are saved into it.
>>
>
> Put this command in your ~/.bashrc file to append the commands to the
> history instead of overwriting:
> shopt -s histappend
>
> Add this line to write the previous line to disk, this avoids you to
> close the session to write the history to the file:
> PROMPT_COMMAND='history -a'
Cool! I didn't know about this. You learn something new everyday.
:)
-- b
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
More information about the Xfce
mailing list