Failed to create symbolic link
Hello,
Maybe it's a bit odd, being a newbie, but I started with Linux From Scratch. I've read my Linux books and I don't understand why I caoonot create a symbolic link. Here's the output: root@sparrow:/mnt/lfs# ln -sv /tools / ln: failed to create symbolic link `/tools': File exists I looked in the root directory but there is no link there. Can anyone explain? Thanks in advance. |
You should give a file name to the symboliclink for /tools. Otherwise it will be an infiniteloop symbolic link.
e.g Quote:
|
As per manual of ln, syntax is:
Code:
ln [OPTION]... [-T] TARGET LINK_NAME (1st form) Code:
ln [option] source_dir linkname Code:
~$ ln -s /tools <linkname> |
The problem is you're telling it to create a link to /tools in /. Since you didn't give it a name, it will use the name of the target, which is tools. So essentially the command you're issuing is:
ln -sv /tools /tools The error is because it can't create a link called /tools because a file of that name already exists (it also happens to be the one you're trying to link to, which if the command went through would be replaced by a link pointing to itself). |
Solved
Quote:
After removing this directory the command works |
:)
Good, then mark the thread as solved (on top menu, select Thread Tools option and Mark this thread as solved).
|
All times are GMT -5. The time now is 08:02 AM. |