Chris Quenelle is a tools developer at Oracle Corp. He's worked on performance and debugging tools at Sun and Oracle for over 15 years. He reads comic books and science fiction, and has more tivos than he can keep track of.
July 2014
S M T W T F S
« Nov    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Is shell history an anachronism?

I work in an environment that has user home directories shared over NFS.  I always thought that kind of made the normal shell history mechanism fall on it's face.  None of the shells I've seen will actually do the hard work of synchronizing the shell history file to collect data from multiple different hosts in one file.  It even falls apart when you have multiple term windows open on one machine.  Many years ago I realized I didn't want my shells writing frequently to my home directory over NFS, so I relocated my history file to /tmp.  This means I'll get history restored when I log into the same machine (until it gets rebooted) but it's put luck which session on the same machine saved it's history last.  Bash is my normal shell these days, and it has a lot of features to tweak and manipulate the history, but none of the features seem to deal with the inherent sync issues.  I suspect everyone uses history within their current shell session, and nobody much cares if it is saved or not. The reason I care is because I'm looking at using it as a platform to associate command history with logical projects.  It's an interesting idea, but I'm surprised the whole mechanism is so poorly adapted to modern environments.

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>