Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Customizing the search path for commands: The PATH variable z/OS UNIX System Services User's Guide SA23-2279-00 |
|
Command interpreters usually have to search for a file that contains the command you want to run. When you are using the shell, you tell the shell where to search for a command. Essentially, the shell uses a list of directories in which commands may be found. This list is specified in your PATH variable in your etc/csh.cshrc file. The list could be called your search path, because it tells the shell where you want to search. You can set up a search path with a command of the form:
or,
For example, you might
enter:
The
shell then searches the directories in the following order, when looking
for commands or shell scripts:
As soon as the shell finds a file with an appropriate name, it runs that file. Because the shell runs a command as soon as it finds a file with an appropriate name, pay close attention to the order in which you list directory names in your search path. For example, the previous search path specifies the /bin directory (where shell commands are stored) before the /usr/bin directory. If you set up your PATH incorrectly, you could get the wrong command. You should generally search the shell commands directory first: /bin. |
Copyright IBM Corporation 1990, 2014
|