Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PATH not working

Status
Not open for further replies.

fatty37us

MIS
Joined
Apr 26, 2001
Messages
3
Location
US
I add a directory to the PATH variable but later when I run a "which" command on a file in the directory, I get:

no 'filename' in 'different paths....'

I can set other directories in the path successfully and I have checked all the directory permissions. Everything seems to check out except for the this single directory will not seem to be added.


What could be the problem?
 
Check have u added the directory path correctly and exported the PATH variable.

# PATH=$PATH: <new path>
# export PATH

if it is ksh shell, u can directly write

# export PATH=$PATH : <new path>

Then, verify the new path has been added

# echo $PATH

If u do not see your new path, then there is some problem in adding path.

If u want this path to be permanent add this entry in /etc/profile or in .profile files.

Then, u can check the built-in or path by

# which

or if it is ksh shell

# whence -v

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top