Include files though directory excluded
maxb at ukf.net
Tue Feb 18 11:04:49 EST 2003
Gregor Waluga wrote:
> I got a little question on the rsync-option include/exclude:
> I excluded all hidden files in my home-directory but I want two files
> to be included. I used following command:
> gregor at notebook:~> rsync -avzuPn -e ssh --exclude=.* --exclude=*
> --include=.kderc --include=.gaimrc /home/gregor/
> 192.168.0.1:/home/gregor/ building file list ...
> 1 file to consider
> wrote 69 bytes read 20 bytes 178.00 bytes/sec
> total size is 0 speedup is 0.00
> gregor at notebook:~>
> Why this transfer was not successful? The syntax is correct (I think).
> My general problem is, that I want to use an include-file, where also
> exludes are listed. Here's my file (base directory is /home/gregor/):
> - *
> - .*
> + .kde/share/apps/kabc/*
> + .kde/share/apps/kbear/*
> + .kde/share/apps/kopete/*
> + .kde/share/apps/korganizer/*
> + .kde/share/apps/quanta/*
> + .gaim/*
> + .gaimrc
> + .OpenOffice/user/config/*
> + .OpenOffice/user/wordbook/*
> What's wrong here??
You exclude everything on the first line. Rsync never looks beyond the
initial exclude, because it matches _everything_.
More information about the rsync