[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to do "cp -sR" without "can make relative symbolic links..." err
From: |
Guy Harrison |
Subject: |
Re: How to do "cp -sR" without "can make relative symbolic links..." errors |
Date: |
Mon, 23 Aug 2004 20:00:58 GMT |
User-agent: |
KNode/0.7.7 |
Fred Phase wrote:
> I want to copy a directory tree but the target tree should consist
> only of symlinks to the source tree (with the exception of
> directories).
>
> It's basically to create a new instance of a PHP application.
>
> It seems to me that "cp -sR <sourcedir> <targetdir>" should work but
> in practive I get loads of "can make relative symbolic links only in
> current directory" errors.
>
> So it seems the -s switch doesn't really work with the -R switch.
>
> Is there any way to get around this limitation?
>
> -------------------------------------
>
> HOLD ON! Just found out I can make it work if I type the _full_ path
> name for the source directory. i.e. "cp -sR </full/path/to/sourcedir>
> targetdir
>
> Just posting this in case anyone else ever gets stuck on this like I
> just did. I couldn't find any other post on this in Google.
There's also a tool 'lndir' from X build which often makes an appearance in
its own right (if it doesn't exist it's likely be trivial to install). It's
exactly what you want for forcing a build outside the source tree for code
that insists on compiling only within its source tree.