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

 
tech-notes/rsync-exclude-pattern.txt · 最后更改: 2008/01/17 14:43 由 blf
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki