I am sync-ing up a directory that has a bunch of documents in it. Users that input documents with all manner of weird characters in their file names. I need to sync up these files from one location on Linux to another. Many times only a single file needs to be updated. When the file name contains a single quote it croaks. I need to specify user@server for the destination, otherwise it works. For example:
rsync --rsh=ssh "zz/joe's change.txt" "/somedir/y/joe's change.txt"
rsync --rsh=ssh "zz/joe's change.txt" user@server:"/somedir/y/"
But the form I wish to use:
rsync --rsh=ssh "zz/joe's change.txt" user@server:"/somedir/y/joe's change.txt"
bash: -c: line 0: unexpected EOF while looking for matching `'' bash: -c: line 1: syntax error: unexpected end of file rsync: connection unexpectedly closed (0 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at io.c(165)
I could use the second form (unless some nut puts a ' in the directory name), but really want to use the third form.