Brethlosze
Brethlosze

Reputation: 1618

Cygwin `rsync` Local Folders Paths

I require to synchnorize two folders in a Cygwin or minGW installation between a folder in the current disk and a folder in another disk.

A call such as

rsync -a dir1\ d:\dir2

is illegal, because of the syntaxis of the path in Windows.

ssh: Could not resolve hostname d: Name or service not known

How should i write the paths in Cygwin for this case?

Upvotes: 3

Views: 3032

Answers (1)

MatrixManAtYrService
MatrixManAtYrService

Reputation: 9131

I don't have Cygwin installed currently, but if I recall you're looking for something like:

rsync -a ./dir1 /cygdrive/c/dir2

Assuming that dir1 is in your current working directory. The problem with what you have provided is that cygwin doesn't know that dir1 is a folder, it's trying to treat it as a hostname (e.g. you can use rsync between different machines with this syntax: me@mycomputer:~/somefolder).

To remove ambiguity, try:

rsync -a /cygdrive/d/path/to/dir1 /cygdrive/c/dir2

Where c and d are the drive letters for the particular drives you're looking for.

Upvotes: 3

Related Questions