Excluding most and including some problems continue.

Steven Levine steve53 at earthlink.net
Thu Sep 30 16:22:39 MDT 2010


In <4CA4958C.2858.00AF.0 at cdpr.ca.gov>, on 09/30/10
   at 01:50 PM, "Ian Skinner" <iskinner at cdpr.ca.gov> said:

Hi,

>>or possibly
>>
>> + das/**htdocs/docs*
>> + em/**/htdocs/docs*
>> etc.

>I'm not sure what the difference between the first example and the second
>example is supposed to be?

That's my bad eyes.  This should have been

 + das/**htdocs/docs*
 + em/**htdocs/docs*

but it's not going to do what you really want.

>I don't see how that would address my needs, but I'm not sure what the
>double ** symbols represent?

I recommend you read the man page.  ** and *** can be very useful.

>But there is no extra directories between
>the "das" and the "htdocs" directories in my use case.

OK.  That's why I said I was not sure what you were asking.

>I want to mirror the following directories from the above example and
>exclude everything else. /export/home/em/htdocs/docs/*
>/export/home/enf/htdocs/docs/*
>/export/home/das/htdocs/docs/*
>(And seven more similar directories)

OK.  This is easier.

>I just tried this filter file somewhat based on your previous suggestion
>but it excluded everything.

It's close, but you need to augment is a bit.  Try

+ das/htdocs/docs/*
+ em/htdocs/docs/*
etc.
+ */
- *

and add --prune-empty-dirs to the command line.

Also, if you really only want the contents of specific directories and not
the content of any of the subdirecories, you can often avoid the recursive
scan and use the --relative option and just list the source directories on
the command line.

Steven

-- 
----------------------------------------------------------------------
"Steven Levine" <steve53 at earthlink.net>  eCS/Warp/DIY etc.
www.scoug.com www.ecomstation.com
----------------------------------------------------------------------



More information about the rsync mailing list