Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use tcsh and have the following in my .cshrc file. But the .history file is not updated as and when I execute a command. Is there anyway so that .history file is updated every time I execute a command ?

set history=500
set savehist=1
set histfile = ~/.history
share|improve this question

migrated from stackoverflow.com May 30 '13 at 2:27

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 1 down vote accepted

You can manually update the file with history -S

In tcsh, you can make an alias that runs when each command is actually executed:

alias precmd 'history -S'
share|improve this answer

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.