SUMMARY: Path Not Followed

From: <Andrew_Rotramel_at_cch-lis.com>
Date: Tue Aug 05 2003 - 10:32:50 EDT
I asked why a file that is in my path was not found by the which command.
As nearly everyone pointed out, the file must be executable to be found by
the which command. A quick test confirmed this. I also discovered that the
which commands only reports files that the user can execute.

A couple of people suggested that my path was bad or my dot files were
bombing before the path variable was read, which amounts to the same thing.
They suggested doing "echo $path" to check. This was an excellent
suggestion, but I had done that before I posted. Out of curiosity I put a
bogus directory at the start of my path statement and it did not trouble
the which command at all. It ignored the bogus directory and told me where
my file was.

I have been a Solaris admin for 5 years now, and I continue to be amazed by
all the little quirks in the system. I am also amazed that I missed the
first sentence of the man page which clearly says that the which command
only finds executable files.

Andrew Rotramel

====================================
Original Post:
I have checked the FAQ, Google and the archives.

I see this problem on Solaris 2.6 and 2.9. I am using csh.

My path statement is in .login, which sources /etc/.login.

I create a file and put it in a directory in the path. I do "which file",
but don't find it. I do "rehash", but still don't find it. I reboot, but
still don't find it. I move the file to other directories in the path, do
"rehash", "source .login", and "reboot", but Solaris still does not find
the script.

hashstat reports that the file was found. I say this because the hits
number increments and the misses number does not change.

How do I get Solaris to find a file which is in the path.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Tue Aug 5 10:36:40 2003

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:17 EST