7

This is a follow-up question to Is there a maximum size to the bash history file?.

Unfortunately, it doesn't work with the atmospheric science department computers, as they use tcsh rather than bash.

Also, for some reason, the history file keeps on getting replaced whenever I quit my remote putty session and start a new one. How do I fix that?

1 Answer 1

10

Here is a good starting point:

http://hints.macworld.com/article.php?story=20070715091413640

set history = 2000          # History remembered is 2000
set savehist = (2000 merge) # Save and merge with existing saved 
set histfile = ~/.tcsh_history
 ...in .tcshrc and this line... 
history -S
 ...in .logout solved the problem. 

Now history is not only preserved between Terminal sessions, but also merged (considering command dates).

Another note, just because the login shell is tcsh doesn't mean you have to use it. Do you have bash installed? Can you run:

$ bash

If that works, you can just put a 'bash --login' in your .tcshrc and then use bash (or zsh if you are feeling advantageous).

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .