On 28/10/2015 15:29, Michael Havens wrote:
I think I do.
--
:-)~MIKE~(-:
I think you don't ;-)
A symbolic link (symlink) like the one you are talking about is a small
file pointing to another file. It just contains the name of that file,
but otherwise has nothing to do with its target. That is, you can remove
the target and add it again, then the link is still pointing to the
target. Example:
Suppose you have the file `gcc' in /usr/bin.
Create the symlink:
ln -s gcc /usr/bin/cc
then, if you type:
cc someprogram.c
it is (almost) equivalent to typing:
gcc someprogram.c
Now hide gcc:
mv /usr/bin/gcc /usr/bin/gcc1
and type:
cc someprogram.c
You get:
/usr/bin/cc: No such file or directory.
That error is misleading actually: /usr/bin/cc indeed exists, but the
link it refers to does not.
Reinstate gcc:
mv /usr/bin/gcc1 /usr/bin/gcc
Works again:
cc someprogram.c
Now, if you type again:
ln -s gcc /usr/bin/cc
You get:
ln: failed to create symbolic link '/usr/bin/cc': File exists.
This is a protection against accidentally changing a symlink.
Two solutions:
- Use ln -sf (force)
- remove the link command from your script...
Pierre
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style