[lfs-support] ln -sv ../usr/bin/cpp /lib

Bruce Dubbs bruce.dubbs at gmail.com
Tue Mar 20 08:30:46 PDT 2012

Alexander Kapshuk wrote:
> On Tue, Mar 20, 2012 at 4:39 PM, Rick Shelton <rick.shelton at gmail.com>wrote:
>> On Tue, Mar 20, 2012 at 7:41 AM, Alexander Kapshuk
>> <alexander.kapshuk at gmail.com> wrote:
>>> While working on '6.17.1. Installation of GCC', I created and cd'd into
>>> '/sources/gcc-build'. One of the instructions suggests creating this
>>> symlink, 'ln -sv ../usr/bin/cpp /lib'. I assumed that I was supposed to
>> run
>>> the command line while still in '/sources/gcc-build'. If that is the
>> case,
>>> shouldn't the command line be 'ln -sv ../../usr/bin/cpp'?
>> When the ln command is given two paths, the current directory does not
>> affect the result. The current directory only has an affect when there
>> is only one path passed to the command.
>> --
>> http://linuxfromscratch.org/mailman/listinfo/lfs-support
>> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
>> Unsubscribe: See the above information page
> So in other words, 'ln -sv ../usr/bin/cpp /lib' and 'ln -sv /usr/bin/cpp
> /lib' are equivalent?

A general practice is for symbolic links to be relative.  If you copy a 
directory tree, relative paths stay relative.

   -- Bruce

More information about the lfs-support mailing list