ln -s Help (quick and simple)
Here is a quick and simple problem.
If I type Code:
ln -s kaid kaid2 Code:
ln -s kaid /usr/bin/kaid Code:
cannot access `/usr/bin/kaid': Too many levels of symbolic links |
Quote:
ln -s <target> <symbol> not ln -s <symbol> <target> In other words, in your second example, you make a symbolic link called /usr/bin/kaid that links to something called "kaid" which would likely be in ./ and not really be anything. You should do: ln -s /usr/bin/kaid kaid |
Nope, you're backwards.
|
From man ln:
ln [OPTION]... [-T] TARGET LINK_NAME (1st form) ln [OPTION]... TARGET (2nd form) ln [OPTION]... TARGET... DIRECTORY (3rd form) ln [OPTION]... -t DIRECTORY TARGET... (4th form) You make a link to a target---the target name always comes first---except #4 (which I do not understand) In OPs 1st example, the order was target, link and the link worked I think the problem has to do with using full pathnames in certain situations, but lets confirm with OP---where in fact is the target file? Is it possible that the first example worked because kaid2 is really the target? |
Could you check if your right the next time you post? Its not that hard. I bet you $999999999999 you have this program (ln) too and are capable of checking yourself.
|
Quote:
Who is this addressed to? I suddenly find that I don't know what this thread is about. You posed a question--- Do you now have the answer? If your post is saying that someone made a mistake, perhaps you should say what the mistake was...... |
No, sorry, but the command i have is correct... it works in the current directory, but when the link is in /usr/bin it doesn't work
|
As I said in my other post, it has to do with specifying full path names. I just tried a few experiments.
If I link OUT of a folder, I needed to specify the full path name. When in /opt: ln -s vpnclient /home/mherring/Desktop does not work whereas ln -s /opt/vpnclient /home/mherring/Desktop DOES work But if I am in /home/mherring/Desktop, I can do: ln -s /opt/vpnclient vpnclient, and it works And that's the truth........ |
Thankyou, this is strange though -- did the developers do this on purpose?
|
Quote:
No, I think there is probably a rational reason for it to be that way--but I have never seen it... The really easy way to stay out of trouble is to always link IN, using the default link name: ln -s /path/path/target Automatically creates the link in the current directory with the name of "target" |
I think its because when ln -s 1 /dir/2 is made, the file /dir/2 is literally linked to 1, and there is no 1 in the directory 2 is in -- thats the best I can explain it
|
All times are GMT -5. The time now is 08:34 PM. |