More information about the Underscore mailing list

[_] rsync - apostrophe in filename help!

Adam Beaumont adambeaumont at gmail.com
Tue Jul 17 16:07:58 BST 2007

Hi underscorers,

I'm trying to write a backup script for my NAS but have got stuck on a
folder with an apostrophe in it's name. Here's what I have:

rsync -auvz --rsh=ssh user at 192.168.1.3:/cygdrive/c/Documents\ and\
Settings/Noah\'s\ Ark/My\ Documents/* /home/backup/tiger/My\
Documents/

but it doesn't work and seems to be getting stuck on the apostrophe in
Noah's... I've also tried using a variable

BLAH="/cygdrive/c/Documents and Settings/Noah's Ark/My Documents/*"
and then sticking it in rsync that way:

rsync -auvz --rsh=ssh user at 192.168.1.3:"$BLAH" /home/backup/tiger/My\ Documents/

but to no avail...

please help!

Cheers,
Adam