10-31-2005
11,728,
1,345
Join Date: Feb 2004
Last Activity: 8 May 2020, 9:07 AM EDT
Location: NM
Posts: 11,728
Thanks Given: 903
Thanked 1,345 Times in 1,201 Posts
It depends. There is an environment variable -- PATH. Your shell will search each directory named in the path, in the order the directories occur in the PATH variable.
If a file matching the name you entered is found, it gets run. Most unix commands should already be in your path. If not change PATH in your .cshrc or .profile
By including a dot >.< in the PATH, it means "search the current directory". This works if have written code to do special tasks, and ther code is in the current working directory. Another feature is the HOME environment variable. It points to your login directory.
If you add $HOME to PATH, it will check your login directory for the file. But you need to be careful that you do not create a personal file in your login directory that is has duplicate name of an existing unix command. If you do, the unix command may stop working.
DOS has a PATH as well.