On 4/19/07, Rick Shelton <[EMAIL PROTECTED]> wrote: > it's fine. > the semantics for creating symbolic links with ln takes a little > getting used to. I don't know how to explain it very well, so i > just say "play with it and you'll get a feel for it."
That's the best advice. I'll take a crack at the explanation, though. There are multiple ways to invoke ln, but in the common case, the destination (where the symlink will be placed) is the second path. If it's absolute, then it doesn't matter where you invoke the command from, it's going to that spot. What it links to (the target) is the first path. This can be relative or absolute. So, > > ln -sv gcc /usr/bin/cc this says you're going to create a symlink at /usr/bin/cc, and it's going to point to gcc. The target (gcc) is relative to the link name, so it means that /usr/bin/cc -> gcc in the same directory. > > Now I am confused! Are the commands, especially the pathes or my working > > directory right?? > > Should the first command be? > > ln -sv ../../usr/bin/cpp /lib This wouldn't work. If you start at /lib and then ascend two directories, ../.. , you are...where? But if you start at /lib, walk up one directory to / (../), then go to usr/bin/, you'll find the target, cpp. man ln. It takes some getting used to, but just know that all the ln commands you see in the book can be run from any directory because the link name is always absolute. -- Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
