Gentoo Archives: gentoo-user

From: Bo Andresen <bo.andresen@××××.dk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Help : mc and ln mixup
Date: Fri, 14 Apr 2006 02:04:02
Message-Id: 200604140356.48443.bo.andresen@zlin.dk
In Reply to: [gentoo-user] Help : mc and ln mixup by Rohit Sharma
1 On Friday 14 April 2006 02:06, Rohit Sharma wrote:
2 > Hi there,
3 >
4 > Please see the following. Both /usr/bin/ln and /usr/bin/mc on my system
5 > seem to launch mc.
6 > if I delete one, the other disappears as well.
7 > if I emerge mc, /usr/bin/ln also appears.
8 > Even if /usr/bin/ln is deleted, which ln returns /usr/bin/ln
9 >
10 > What is happening. I am completely baffled.
11
12 Sounds weird..
13
14 # cd /usr/bin/
15 # which ln
16 /usr/bin/ln
17 # mv ln ..
18 # which ln
19 /bin/ln
20 # mv ../ln .
21 # which ln
22 /usr/bin/ln
23
24 If you run
25
26 # echo $PATH
27
28 you will see that /usr/bin is listed before /bin. which searches the
29 directories in $PATH and stops at the first match so since /usr/bin comes
30 before /bin it returns /usr/bin/ln.
31
32 If you delete /usr/bin/ln it should return /bin/ln which should be unaffected.
33 If you delete /bin/ln then /usr/bin/ln will become a dangling symbolic link
34 pointing at a file which doesn't exist..
35
36 Which version of coreutils do you have?
37
38 # equery b ln
39 [ Searching for file(s) ln in *... ]
40 [...]
41 sys-apps/coreutils-5.94-r1 (/bin/ln)
42 sys-apps/coreutils-5.94-r1 (/usr/bin/ln -> /bin/ln)
43
44 If you are still having problems with this then show us the commands that you
45 are running and the output that leads you to your conclusions..
46
47 HtH
48
49 --
50 Bo Andresen

Replies

Subject Author
Re: [gentoo-user] Help : mc and ln mixup Rohit Sharma <bhavhit@××××××××××.uk>