Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

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).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.