Closed daxian-dbw closed 2 weeks ago
That is indeed problematic.
cp -R
's (sensible) default behavior, as you've shown, is to copy symlinks as links, instead of copying their targets, which with directory targets could result in a lot of unwanted content getting copied.
Wanting to copy link targets requires opt-in via -L
, for instance.
While on Windows this default behavior is unfortunately reversed in xcopy.exe
and robocopy.exe
, these utilities at least offer opt-ins for copying links as such: /B
and /SL
, respectively.
It looks like, due to its age, this issue has fallen through the cracks; please label it appropriately so it can be revived.
This issue has not had any activity in 6 months, if there is no further activity in 7 days, the issue will be closed automatically.
Activity in this case refers only to comments on the issue. If the issue is closed and you are the author, you can re-open the issue using the button below. Please add more information to be considered during retriage. If you are not the author but the issue is impacting you after it has been closed, please submit a new issue with updated details and a link to this issue and the original.
Steps to reproduce
Expected behavior
Copy-Item -Recursive
should copy the symbolic link to/tmp/dest
, just likecp -r
Actual behavior
Environment data