On Friday 14 April 2006 02:06, Rohit Sharma wrote: > Hi there, > > Please see the following. Both /usr/bin/ln and /usr/bin/mc on my system > seem to launch mc. > if I delete one, the other disappears as well. > if I emerge mc, /usr/bin/ln also appears. > Even if /usr/bin/ln is deleted, which ln returns /usr/bin/ln > > What is happening. I am completely baffled.
Sounds weird.. # cd /usr/bin/ # which ln /usr/bin/ln # mv ln .. # which ln /bin/ln # mv ../ln . # which ln /usr/bin/ln If you run # echo $PATH you will see that /usr/bin is listed before /bin. which searches the directories in $PATH and stops at the first match so since /usr/bin comes before /bin it returns /usr/bin/ln. If you delete /usr/bin/ln it should return /bin/ln which should be unaffected. If you delete /bin/ln then /usr/bin/ln will become a dangling symbolic link pointing at a file which doesn't exist.. Which version of coreutils do you have? # equery b ln [ Searching for file(s) ln in *... ] [...] sys-apps/coreutils-5.94-r1 (/bin/ln) sys-apps/coreutils-5.94-r1 (/usr/bin/ln -> /bin/ln) If you are still having problems with this then show us the commands that you are running and the output that leads you to your conclusions.. HtH -- Bo Andresen
pgpXwqrbekMu4.pgp
Description: PGP signature