Results 1 to 3 of 3
I'm running Cygwin.
Here is what I'm trying to sync:
The path is /cygdrive/c/Program Files (x86)
I'm going to leave out the /cygdrive/c for brevity.
rsync -avz john@doe.com :/Program\ Files\ ...
- 01-23-2008 #1Just Joined!
- Join Date
- Jul 2004
- Location
- Florida
- Posts
- 6
Cannot escape parenthesis using rsync
I'm running Cygwin.
Here is what I'm trying to sync:
The path is /cygdrive/c/Program Files (x86)
I'm going to leave out the /cygdrive/c for brevity.
rsync -avz john@doe.com:/Program\ Files\ \(x86\) ./
I've also tried:
rsync -avz john@doe.com:"/Program Files (x86)" ./
and:
rsync -avz john@doe.com:/Program\ Files\ \\(x86\\) ./
I get this error for the first two:
line 2: syntax error near unexpected token `('
and the third one tells me the same thing except ')' is the unexpected token.
Any ideas as to what I'm doing wrong?
Thanks,
Alex C.
- 01-23-2008 #2
So I am going to assume that these errors are all coming from rsync, and not from Bash.
In any event, you have escaped the parens in Bash. If rsync is complaining about them, you need to escape them there too:
Now the quotes escape the parens for Bash, and the "\\"s (which will be turned into "\" by Bash) will escape the parens for rsync.Code:rsync -avz john@doe.com:"/Program Files \\(x86\\)" ./
DISTRO=Arch
Registered Linux User #388732
- 01-23-2008 #3Just Joined!
- Join Date
- Jul 2004
- Location
- Florida
- Posts
- 6
Thank You Cabhan!!!
Worked like a charm : )
This drove me nuts for two hours...


Reply With Quote