I have a /usr/sbin on my search path (echo $PATH).
I have my lsof executable in this directory. Why do I get lsof: command not found if I just type lsof on the prompt. I am using csh.
I have a /usr/sbin on my search path (echo $PATH).
I have my lsof executable in this directory. Why do I get lsof: command not found if I just type lsof on the prompt. I am using csh.
You could try using rehash
since I seem to recall that csh
uses a hash to find executables. Trying /usr/sbin/lsof
will also allow you to tell if this is the problem (or may tell you what the problem actually is).
Also check the permissions of lsof
and the /usr/sbin
directory to make sure they're executable/searchable (although it's unlikely that's a problem).
Failing that, you should probably wait until this question gets nudged across to SU where it belongs :-)