Hi there, We have a directory structure such as: "/home/foobar/domains/example.com/public" "/home/cake/domains/mydomain.org/public" I need to use a single rsync command to sync "/home/*/domains/*" to another directory, but I'm really struggling on how to do this. rsync -arv '/home/*/domains/*' ~/ rsync: change_dir "/home/*/domains" failed: No such file or directory (2) I've been looking at doing it another way, using something mad such as: rsync -arv --exclude='*' --include='*/domains/*' home ~/ But this still copies every file under /home Is this possible to do? Regards Alex Cartwright
On Fri, Oct 29, 2010 at 8:00 AM, Alex Cartwright <alexc223 at googlemail.com>wrote:> rsync -arv '/home/*/domains/*' ~/ >That is a local copy, so you're quoting the wildcards tells the shell that they are literal characters in the filename. If you want the shell to do wildcard expansion, unquote the argument. The quotes would only be required if you need to send the wildcards to a remote host. ..wayne.. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20101029/344b312d/attachment.html>