Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transferring from Windows to Linux with rsync

noob here,

I'm trying to transfer a file using rsync from windows to linux. I have this code, but I'm getting an error

rsync -avz -e ssh C:\users\file.txt [email protected]:/var/dir

I get this error The source and destination cannot be both remote

And if I try

rsync -avz -e ssh /c/users/file.txt [email protected]:/var/dir

I get, No such file or directory

So, I think the problem is with the path of the file on the windows.. I've heard about cygwin but haven't really tried it

What can I do to get the path to work?

like image 556
andrewk Avatar asked Dec 29 '22 05:12

andrewk


1 Answers

If you're using CygWin to rsync from the Windows box, the local file you want is almost certainly:

/cygdrive/c/users/file.txt

rather then:

/c/users/file.txt
like image 129
paxdiablo Avatar answered Jan 12 '23 00:01

paxdiablo