Saving command history between logins

To save your command history between one login session and another set the variable savehist in your .login file. For example:

   set savehist=25

This saves the previous twenty-five (25) commands you have used to the file .history in your home directory whenever you logout.

When you next login the contents of the file .history are placed in the history list. You can then re-use commands from your previous login session.

Too high a value for the savehist variable will slow down the login procedure. Do not set the value of the savehist variable higher than that of the history variable.


[Home] [Search] [Index]