On Wed, 8 Oct 2003, <[EMAIL PROTECTED]> wrote: > > Hey there, > > when i try to sync two directories or files containing a "-" character > in ther path, rsync fails: > # /usr/bin/rsync --partial -rcvaLe "ssh -o UserKnownHostsFile=/dev/null -o \ > StrictHostKeyChecking=no" --progress "[EMAIL PROTECTED]:/path/band - album/" "/path/" > > this gives an error like: > rsync: on remote machine: -: unknown option > > every escaping like \- or \\- fails, too. Any help is appreciated. > joerg maier
The dash isn't your problem. It's the spaces. The command being sent to the remote isn't including the quotes and isn't escaping the spaces, so the "[EMAIL PROTECTED]:/path/band - album/" becomes three tokens, and the '-' by itself causes the error. Try substituting one of these (note single vs. double quotes): '[EMAIL PROTECTED]:/path/band\ -\ album/' "[EMAIL PROTECTED]:/path/band\\ -\\ album/" '[EMAIL PROTECTED]:"/path/band - album/"' "[EMAIL PROTECTED]:'/path/band - album/'" This might work, too: "[EMAIL PROTECTED]:/path/band\ -\ album/" But I'd go with the first one, above. Good luck. -- John Van Essen Univ of MN Alumnus <[EMAIL PROTECTED]> -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html