This is an odd behavior observed only in Solaris, when I try to copy a symbolic link with the " cp -R -P" command to another folder with a different name, it copies the entire directory / file that it points to.
cp -R -P
For example:
link -> dir cp -R -P link folder/new_link
I believe the argument β-dβ is what you need.
According to cp man page :
-d same as --no-dereference --preserve=link
Example:
cp -d -R -P link folder/new_link
I used "cp -d" and it worked for me.
cp man, , , -H .
Try using cpio (with -p (pass)) or the old tar in the pipe trick.
You might consider copying through tar, for example tar -cf - srcdir | (cd somedir; tar -xf -)
Source: https://habr.com/ru/post/1705809/More articles:ΠΠΈΠ½Π°ΠΌΠΈΡΠ΅ΡΠΊΠΈ ΡΠΎΠ·Π΄Π°Π½Π½ΡΠ΅ Π²ΡΡΠ°ΠΆΠ΅Π½ΠΈΡ - c#Can I redirect the wrong message to outgoing MSMQ? - wcfWhich database to use for a Windows application? - databaseINSERT 6000 Rows - Best Practice - apiHow do you extract a subtype of a patch of a uniform diff type? - diffC # WebBrowser does not fire DocumentCompleted event - multithreadingWhy can't I set $ LIST_SEPARATOR in Perl? - perlThe most efficient way to convert a string to 2 decimal places in C # - stringWhere can I get cocoa hands-on training besides WWDC? - iphoneΠΠ°ΠΊΠΎΠ² Π½Π°ΠΈΠ»ΡΡΡΠΈΠΉ ΡΠΏΠΎΡΠΎΠ± Π½Π°ΡΠΈΡΠΎΠ²Π°ΡΡ ΡΡΠΎΡ ΡΠ»Π»ΠΈΠΏΡ Π² ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΈ Π΄Π»Ρ iPhone? - iphoneAll Articles