Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

up vote 2 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

You must log in to answer this question.

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