pulling selected subdirs by wildcard

Michael Brutsch michael at brutsch.com
Tue Jan 29 07:17:35 EST 2002


I am trying to sync a tree, as follows:

/top
  |-dir1
  |  |-data
  |
  |-newdir
  |  |-data
  |
  |-etc,etc

I need to pull just the 'data' directories, then push back
everything BUT the data directories.

I tried this:

rsync --include "*/" --include "data/" --exclude "*"

but it just includes everything.  If I leave off the '--include
"*/"', I get nothing.

My guess is that I'm not using the '--include "*/"' kludge properly.

Thanks,
Michael

--
Michael Brutsch
michael at brutsch.com                       




More information about the rsync mailing list