Include exclude not working
Dave Dykstra
dwd at bell-labs.com
Wed Feb 27 09:43:34 EST 2002
You should find if you remove the -n option that it actually does copy the
directories. The dry-run option has a few cases that don't completely
reflect what happens without it, and this is one of them.
- Dave Dykstra
On Mon, Feb 25, 2002 at 11:37:00PM +0100, Thomas Schweikle wrote:
>
> Hi!
>
> playing with --include, --exclude, and --exclude-from=file I found these
> not working:
>
> xcnlm00s:/etc/adsm/script # rsync -navx --include="*/" --exclude="*" -e
> ssh newsfeed:/
> receiving file list ... done
> wrote 29 bytes read 28605 bytes 3014.11 bytes/sec
> total size is 0 speedup is 0.00
>
> xcnlm00s:/etc/adsm/script # rsync -navx --exclude="*" --include="*/" -e
> ssh newsfeed:/
> receiving file list ... done
> wrote 29 bytes read 44 bytes 13.27 bytes/sec
> total size is 0 speedup is 0.00
>
> shouln't the first of these deliver all directories found on host
> newsfeed?
>
> Using a exclude/include file the same Problem arose:
> newsfeed.lst:
> + */
> - *
>
> xcnlm00s:/etc/adsm/script # rsync -navx --exclude-from=newsfeed.lst -e ssh
> newsfeed:/
> receiving file list ... done
> wrote 29 bytes read 28605 bytes 3014.11 bytes/sec
> total size is 0 speedup is 0.00
>
> newsfeed.lst:
> + *
> - */
>
> xcnlm00s:/etc/adsm/script # rsync -navx --exclude-from=newsfeed.lst -e ssh
> newsfeed:/
> receiving file list ... done
> wrote 29 bytes read 28605 bytes 3014.11 bytes/sec
> total size is 0 speedup is 0.00
>
> Same. But in "man rsync" is stated:
> If you end an exclude list with --exclude ?*?, note that since the
> algorithm is applied recursively that unless
> you explicitly include parent directories of files you want to include
> then the algorithm will stop at the par?
> ent directories and never see the files below them. To include all
> directories, use --include ?*/? before the
> --exclude ?*?.
>
> Thus I would expect the first to include all directories, but no files.
> But both versions exclude all directories and files!
>
> --
> Thomas
>
>
>
> --
> To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
More information about the rsync
mailing list