capturing bash history

Smylers Smylers at stripey.com
Tue Jun 12 13:05:16 BST 2007


Nigel Hamilton writes:

> I'd like to keep a history of all shell commands across all the xterms
> I'm using but the ~/.bash_history only holds history from one
> terminal.

More precisely, every time you exit a shell the content of that shell's
history is written to .bash_history, overwriting everything else that's
there (including stuff that was only written a second ago from exiting a
shell in another window).

> Any ideas on interleaving the shell history from multiple terminals
> into one file?

Yes:

  http://www.ukuug.org/events/linux2003/papers/bash_tips/#slide8

Smylers


More information about the london.pm mailing list