views:

35

answers:

2

I deleted symbolic link which was pointing to x binary, recreated a same link pointing to y binary i.e. now it’s pointing to y binary instead of x binary.

When I am running binary from its location it’s giving correct result. Let say the binary is at location

$/tmp/value>./y Output is correct

If I go to another directory, /abd/def>/tmp/value/y Its giving me output of x binary

Can anyone tell me why I am getting some issue.

A: 

Psychic debugging suggests you moved the directory that was current directory for your shell (or one of its parents) and are therefore now very confused.

Joshua
+1  A: 

Perhaps value dir inside tmp dir is itself a symlink that changed inbetween? We're guessing here.

ls -la /tmp
ls -la /tmp/value
ls -la /abc/def
eruciform
FYI bash's behavior when dealing with current directory through a symlink is very non-intuitive when certain things happen.
Joshua