On Sun, 2010-03-14 at 14:23 +0000, Paul wrote: > On Sat, Mar 13, 2010 at 08:03:05PM -0800, Steven Monai wrote: > >$ cat >dirs.txt <<EOF > >sourcedir/GroupA > >sourcedir/GroupC > >EOF > > > >$ rsync -r --include-from=filt.txt --prune-empty-dirs `cat dirs.txt` destdir
> I can't quite get that to work when the dirs have spaces in them. I've > tried various forms of backslash escaping the spaces and putting the > dirs in doublequotes, even messing with IFS, but no luck. (And I don't > want to do an rsync command for every sourcedir :)) There is a --files-from option precisely for that purpose! Try: rsync -r --include-from=filt.txt --prune-empty-dirs \ --files-from=dirs.txt . destdir (Note that you need a source argument relative to which the --files-from paths will be interpreted.) -- Matt -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html