From the title I was hoping you would answer a question that has bothered me for a long time: how do multiple xterm/rxvt/aterm/whatever histories interact? No one works in a single xterm, so clearly it is relevant. And if you do different things in different xterms, the histories look different. Yet there is only one .bash_history file in a default setup. Can you explain how this works?