as the answer to this question shows, Is there a difference between hardlinking with cp -l or ln?
The purpose for creating the -l option for the cp command is to recursively hard-link (the contents of) directories. The -s option is the counterpart, creating soft links instead of hard links, but it appears that it can't be used recursively.
Any attempt to do so results in the error message:
cp: `source_dir/source_file': can make relative symbolic links only in current directory
Perhaps this is distro dependent. In Ubuntu 12.04, this is the result. Only if the original file and the link are in the same directory does it work.
Perhaps the syntax is incorrect?
cp -rs target_directory destination_directory
is what I used.
example:
$ ls sourcedir/
-rw-rw---- 1 user group 1123 Jan 8 23:10 source_file
$ cp -rs sourcedir/ targetdir/
cp: `targetdir/sourcedir/source_file': can make relative symbolic links only in current directory
cp -l
was created: it hard links every individual file in the directory instead. The question though, is why does that work recursively, but doing the same thing with symlinks doesn't. – psusi Jan 08 '15 at 22:31