Re: rsync / Include only

In comp.os.linux.misc fritz-bayer@xxxxxx <fritz-bayer@xxxxxx>:

[ using rsync to sync only matched files]

rsync --include '*.xml' --include '*.conf' --include '*.properties'
--exclude '*' -ave ssh

receiving file list ... done
client: nothing to do: perhaps you need to specify some filenames or
the --recursive option?

I seems like the --exclude '*' will exlcude all files.

How do I do an "include only..." ?

Something like this should to the trick:

rsync -avz --include='*/' --include '*.xml' --include '*.conf' \
--include '*.properties' --exclude='*' ...

Adjust to your taste.

Good luck

Please try below URL(s) before answering, most people aren't
using a browser here to read/write, this is usenet.

Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@xxxxxxxxxx | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 180: ether leak