Friday, March 14, 2008

The official Bash History

History in bash is a drag. You log in you find a history. You need a second shell, you log in, but the history of the first shell is gone. You reboot from the shell and all histories are gone. Nuissance....All History for a given shell stays only in memory as long as the shell is open. Only if it exits cleanly is the history written. So I defined


alias h="history -a"


in .bashrc. Why ? I can quickly type "h", and then the current shells history gets written to disk.
So then all histories are the same. HISTSIZE=10000 might help your memory as well...