Is there a way to ignore symlinks when copying from Linux to Windows?

2

0

Ignoring symlinks when copying from one Linux machine to another is easy:

rsync -a --no-links <usr>@<ip>:<source> <destination>

For Linux to Windows, I'm currently using PSCP which provides no such option:

pscp -pw <password> -scp -4 -r <usr>@<ip>:<source> <destination>

I'm having to direct the script to go through and remove all of the symlinks after the transfer. This approach slows down the script and also transfers many files that are not needed (since PSCP transfers the symlink as a copy of the file it points to). Another approach I tried was to map out the file locations without the symlinks and then use pscp to transfer each file. However, that made the script take 30 times longer to run.

Does anyone know of another way to do this or am I stuck using my current approach?

Blackwood

Posted 2018-04-30T15:56:54.630

Reputation: 171

No answers