Solaris Advanced User's Guide

Other Useful Variables

You can set many other variables in your user profile file. For a complete list, refer to the man Pages(1): User Commands. The following sections describe some of the more commonly used options.

noclobber Variable

Use set noclobber to prevent unintentional overwriting of files when you use the cp command to copy a file. This variable affects the Bourne Again, C, Korn, and TC shells. Type the following in your user profile file:

set noclobber

history Variable

The history variable enables you to set the number of commands that you saved in your history list. The history command is useful to view commands you have previously typed. You can also use the history file to repeat earlier commands. Type the following in your .cshrc or .tcshrc file:

set history=100

You can also affect the Bourne, Bourne Again, Korn, and Z shells in the same manner by typing the following line in your user profile file.