rsync exclude PATTERN 规则实例

Here are some exclude/include examples:

 --exclude "*.o"   would exclude all filenames matching *.o
 --exclude "/foo"  would exclude a file in the base directory called foo
 --exclude "foo/"  would exclude any directory called foo.
 --exclude "/foo/*/bar"  would exclude any file called bar two levels below a base directory called foo.
 --exclude "/foo/**/bar" would exclude any file called bar two or more levels below a base directory called foo.
 --include "*/" --include "*.c" --exclude "*" would include all directories and C source files
 --include "foo/" --include "foo/bar.c" --exclude "*" would include only foo/bar.c 
                  (the foo/ directory must be explicitly included or it would be excluded by the "*")

来源: http://www.ss64.com/bash/rsync.html