Could someone please remove me (temporarily from the email list). I tried to
use the web site but failed to get it to work. I am going overseas for 3
weeks and trying to minimise my email accumulation. I am leaving now so will
need someone to do this for me in my absence,

Richard Taylor

-----Original Message-----
From: Martin Pool [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 09, 2000 2:16 PM
To: Ian McNish
Cc: [EMAIL PROTECTED]
Subject: Re: useage question


On Sun, Oct 08, 2000 at 06:31:52PM -0700, Ian McNish wrote:

> > Suppose you have /tmp/a/b/c.gz.  When rsync encounters the directory
> > /tmp/a, it finds that path does not match '*/*.gz' but it does match
> > '*'.  Therefore, that directory is excluded and the files below it are
> > never examined.  As the previous point says
> 
> ok, but if you bothered to read my example in my original message
> you'd realize that i'm only dealing with things one directory level
> deep (that is one level deeper than cwd) so your example is not 
> applicable to my problem. 

Actually it is...

> again the examples pulled from the man page support my statement
> about what __SHOULD__ work, but it's not working the way the man
> page states it should work.

I just asked tridge, and he disagrees with you.  ;-)

Really, it is consistent: directories are being excluded because you
didn't ask for them to be included, and you excluded '*'.  Since this
is a common source of confusion, in the next version of rsync the -vv
double-verbose option will explain which files are included or
excluded, and why.

Here's a more detailed walk-through.  I created a tree of files
exactly as in your original email:

1 ian$ tree /tmp/ian
/tmp/ian
|-- abc
|   |-- five.gz
|   |-- four
|   |-- one
|   |-- three
|   `-- two
|-- abd
|   |-- five.gz
|   |-- four
|   |-- one
|   |-- three
|   `-- two
`-- abe
    |-- five.gz
    |-- four
    |-- one
    |-- three
    `-- two

And you reckon that this command will work:

  rsync -avz --include='*/*.gz' --exclude='*' /tmp/ jumper::files

I'm going to use the CVS head version of rsync which traces exclusions
on -vv.  The behaviour is exactly the same, but the output is more
helpful.

So if I run it (with adjusted paths) using -vv from my development
version, we see:

    1 ian$ ~/rsync/rsync -avzv --include='*/*.gz' --exclude='*' /tmp/ian
/tmp/jrl  
    building file list ... 
    excluding directory ian because of pattern *
    done

Hmm.  Perhaps if we stand in that directory?

     1 ian$ ~/rsync/rsync -avzv --include='*/*.gz' --exclude='*' . /tmp/jrl
     building file list ... 
     excluding directory abc because of pattern *
     excluding directory abd because of pattern *
     excluding directory abe because of pattern *
     done
     ./

Still no good.  What about if we use the option Martin suggested?

    1 ian$ ~/rsync/rsync -avzv --include='*/' --include='*/*.gz'
--exclude='*' . /tmp/jrl
    building file list ... 
    including directory abc because of pattern */
    excluding file abc/one because of pattern *
    excluding file abc/two because of pattern *
    excluding file abc/three because of pattern *
    excluding file abc/four because of pattern *
    including file abc/five.gz because of pattern */*.gz
    including directory abd because of pattern */
    excluding file abd/one because of pattern *
    excluding file abd/two because of pattern *
    excluding file abd/three because of pattern *
    excluding file abd/four because of pattern *
    including file abd/five.gz because of pattern */*.gz
    including directory abe because of pattern */
    excluding file abe/one because of pattern *
    excluding file abe/two because of pattern *
    excluding file abe/three because of pattern *
    excluding file abe/four because of pattern *
    including file abe/five.gz because of pattern */*.gz
    done
    abc/
    abc/five.gz
    abd/
    abd/five.gz
    abe/
    abe/five.gz
    total: matches=0  tag_hits=0  false_alarms=0 data=0
    ./
    abc/

Have a nice day.

-- 
Martin Pool


Reply via email to