Include/Exclude Problem

Dave Dykstra dwd at bell-labs.com
Wed Jul 25 07:42:05 EST 2001


On Fri, Jul 20, 2001 at 05:17:30PM -0500, Perry Hoekstra wrote:
> I am trying to rsync a list of files from one list to another.  I went
> back about five months on the mailing list archive and found this
> message:
> 
> On Tue, Mar 20, 2001 at 03:21:54PM 
> 
> It is possible to build your own complete list of files to copy and give
> them all to rsync, by building a --include list and doing '--exclude *'
> at the end.  Currently you need to also either have --include '*/' or
> explicitly list all parent directories above the files you want included
> or else the exclude '*' will exclude the whole directories.  There's
> been talk of adding a --files-from option which would remove this last
> restriction, and I even offered to implement it, but I'm still waiting
> for anybody to give performance measurements (using rsync 2.3.2 which
> had an include optimization that did something similar if there were no
> wildcards) to show what the performance impact would be.
> 
> - Dave Dykstra
> 
> 
> Taking that message as a template, I created the following command to
> try to move two files:
> 
> rsync -vaR --include 'devel/a.html' --include 'devel/b.html' --include
> '*/' --exclude '*'
> somebox.foo.com::staging/Incremental/07-20-2001_16:00:27/www.foo.com
> 
> I get the following displayed:
> 
> receiving file list ... done
> drwxrwxrwx         512 2001/07/20 17:04:06 Incremental
> drwxrwxrwx         512 2001/07/20 17:04:06
> Incremental/07-20-2001_16:00:27
> drwxrwxrwx         512 2001/07/20 17:04:06
> Incremental/07-20-2001_16:00:27/www.foo.com
> wrote 190 bytes  read 187 bytes  251.33 bytes/sec
> total size is 0  speedup is 0.00
> Return code = 0
> 
> but the files are not moved.  What have I screwed up in my
> include/exclude patterns?  Or have I misinterpreted the email?



You're getting that ls -l type output because you did not specify a 
destination directory.  Try adding a '.' to the end of your command
line.

- Dave Dykstra




More information about the rsync mailing list