tags:

views:

11

answers:

1

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.

A: 

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 :-)

paxdiablo
yes i can run /usr/sbin/lsof
iamrohitbanga
rehash does not work
iamrohitbanga
Can you run _another_ executable in /usr/sbin (without the full path)? In addition, show us what your path actually is.
paxdiablo