X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/38499c1a49445e3a8d8224e303f2e34bf455f840..3c30b9905932e39b170be8e0521370727f264635:/rsync.yo diff --git a/rsync.yo b/rsync.yo index f65e53cf..9b74edb7 100644 --- a/rsync.yo +++ b/rsync.yo @@ -507,8 +507,13 @@ the source and target are on the local machine. dit(bf(--no-whole-file)) Turn off --whole-file, for use when it is the default. -dit(bf(-p, --perms)) This option causes rsync to update the remote -permissions to be the same as the local permissions. +dit(bf(-p, --perms)) This option causes rsync to set the destination +permissions to be the same as the source permissions. + +Without this option, each new file gets its permissions set based on the +source file's permissions and the umask at the receiving end, while all +other files (including updated files) retain their existing permissions +(which is the same behavior as other file-copy utilities, such as cp). dit(bf(-o, --owner)) This option causes rsync to set the owner of the destination file to be the same as the source file. On most systems, @@ -866,18 +871,19 @@ The exclude and include patterns specified to rsync allow for flexible selection of which files to transfer and which files to skip. rsync builds an ordered list of include/exclude options as specified on -the command line. When a filename is encountered, rsync checks the +the command line. Rsync checks each file and directory name against each exclude/include pattern in turn. The first matching pattern is acted on. If it is an exclude pattern, then that file is skipped. If it is an include pattern then that filename is not skipped. If no matching include/exclude pattern is found then the filename is not skipped. -The filenames matched against the exclude/include patterns are -relative to the base directories, so patterns should not -include the path elements to those base directories. The -only way in which a pattern will match the absolute path of -a file or directory is if the base path is the root directory. +The filenames matched against the exclude/include patterns +are relative to the destination directory, or "top +directory", so patterns should not include the path elements +of the source or destination directories. The only way in +which a pattern will match the absolute path of a file or +directory is if the source path is the root directory. Note that when used with -r (which is implied by -a), every subcomponent of every path is visited from top down, so include/exclude patterns get @@ -895,7 +901,7 @@ itemize( start of the filename, otherwise it is matched against the end of the filename. This is the equivalent of a leading ^ in regular expressions. - Thus "/foo" would match a file called "foo" at the base of the + Thus "/foo" would match a file called "foo" at the top of the transferred tree. On the other hand, "foo" would match any file called "foo" anywhere in the tree because the algorithm is applied recursively from @@ -947,12 +953,12 @@ Here are some exclude/include examples: itemize( it() --exclude "*.o" would exclude all filenames matching *.o - it() --exclude "/foo" would exclude a file in the base directory called foo + it() --exclude "/foo" would exclude a file called foo in the top directory it() --exclude "foo/" would exclude any directory called foo it() --exclude "/foo/*/bar" would exclude any file called bar two - levels below a base directory called foo + levels below a directory called foo in the top directory it() --exclude "/foo/**/bar" would exclude any file called bar two - or more levels below a base directory called foo + or more levels below a directory called foo in the top directory it() --include "*/" --include "*.c" --exclude "*" would include all directories and C source files it() --include "foo/" --include "foo/bar.c" --exclude "*" would include