3.6 The PATH Variable

   

PATH is one of the most important variables a user has to deal with. It contains the names of the directories where the shell searches for commands. These directory names are separated by a colon .

 /usr/bin:/usr/ccs/bin:/usr/contrib/bin:/bin 

If you have placed your own commands in your home directory, you can add your home directory to the PATH variable with the following command.

 $  PATH=$PATH:$HOME  $ 

Although you are free to add the HOME directory at the beginning or end of the PATH variable, it is always desirable to add your own directory names at the end. This is because, if you accidentally use a program or script name , the same as a standard HP-UX command, your program will be executed instead of the HP-UX command, as it will be found first by the shell.


   
Top


HP Certified
HP Certified: HP-UX System Administration
ISBN: 0130183741
EAN: 2147483647
Year: 2000
Pages: 390
Authors: Rafeeq Rehman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net