How to copy symbolic links?
Problem
I have directory that contains some symbolic links: I need to copy them to the current directory. The resulting links should be independent from their prototypes and lead directly to their target objects. creates links to links that is not appropriate behavior. refuses to copy links to directories refuses to copy relative links to non-working directory What should I do?
Error Output
user@host:include$ find .. -type l -ls 4737414 0 lrwxrwxrwx 1 user group 13 Dec 9 13:47 ../k0607-lsi6/camac -> ../../include 4737415 0 lrwxrwxrwx 1 user group 14 Dec 9 13:49 ../k0607-lsi6/linux -> ../../../linux 4737417 0 lrwxrwxrwx 1 user group 12 Dec 9 13:57 ..…
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix for: How to copy symbolic links?
From the man page: Personally, I use for most of my heavy copying. That way, I can preserve everything - even recursively - and see the output. Of course, that is just personal preference. As to why your other options did not do what you expected, makes a link instead of copying and follows the links in the source to find the file to copy instead of copying the links themselves.
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix