Tony Heal wrote:
I have a problem on one of my servers. The ‘ls’ command does not have
the –h switch available. So as a workaround until I can determine what
caused this and why I wanted to use the ‘ls’ file from another server.
I copied /bin/ls from server # 2 onto server # 1 and tested it and it
works fine, including the –h switch.
So I typed set, read the PATH and found that /usr/local/bin is in the
path before /usr/bin. I thought I could simply drop the new ls in
/usr/local/bin and the system would see it first when called and use
it. WRONG.
So my questions are:
1. why not?
2. what is the order used in the path?
Thanks
Tony
You can use 'which' to find out which ls is being called, but it goes by
first come first serve:
echo $PATH
/home/jeffd/bin:/usr/local/bin:/usr/bin:/bin
[EMAIL PROTECTED]:~$ touch ~/bin/ls
[EMAIL PROTECTED]:~$ chmod 755 ~/bin/ls
[EMAIL PROTECTED]:~$ which ls
/home/jeffd/bin/ls
[EMAIL PROTECTED]:~$ rm ~/bin/ls
[EMAIL PROTECTED]:~$ which ls
/bin/ls
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]