Home Explore Blog CI



man-pages

17th chunk of `rsync.man`
6bd014ed5809627eef65235c221933fc0009ced526496a020000000100001019
 or more implied options by prefixing the op‐
              tion name with "no‐".  Not all positive options  have  a  negated
              opposite,  but a lot do, including those that can be used to dis‐
              able an implied option (e.g.  --no‐D, --no‐perms) or have differ‐
              ent defaults  in  various  circumstances  (e.g.  --no‐whole‐file,
              --no‐blocking‐io, --no‐dirs).  Every valid negated option accepts
              both  the  short  and the long option name after the "no‐" prefix
              (e.g. --no‐R is the same as --no‐relative).

              As an example, if you want to use --archive (-a) but  don’t  want
              --owner  (-o),  instead  of  converting  -a into -rlptgD, you can
              specify -a --no‐o (aka --archive --no‐owner).

              The order of the options is important: if you specify  --no‐r -a,
              the  -r  option  would  end  up  being turned on, the opposite of
              -a --no‐r.  Note also that the side‐effects of  the  --files‐from
              option  are  NOT  positional,  as it affects the default state of
              several options and slightly changes the meaning of -a  (see  the
              --files‐from option for more details).

       --recursive, -r
              This  tells  rsync  to  copy  directories  recursively.  See also
              --dirs (-d) for an option that allows the scanning  of  a  single
              directory.

              See  the --inc‐recursive option for a discussion of the incremen‐
              tal recursion for creating the list of files to transfer.

       --inc‐recursive, --i‐r
              This option explicitly  enables  on  incremental  recursion  when
              scanning  for  files,  which is enabled by default when using the
              --recursive option and both sides of  the  transfer  are  running
              rsync 3.0.0 or newer.

              Incremental recursion uses much less memory than non‐incremental,
              while  also beginning the transfer more quickly (since it doesn’t
              need to scan the  entire  transfer  hierarchy  before  it  starts
              transferring  files).   If  no recursion is enabled in the source
              files, this option has no effect.

              Some options require rsync to know the full file list,  so  these
              options disable the incremental recursion mode.  These include:

              o      --delete‐before (the old default of --delete)

              o      --delete‐after

              o      --prune‐empty‐dirs

              o      --delay‐updates

              In  order to make --delete compatible with incremental recursion,
              rsync 3.0.0 made --delete‐during the default delete  mode  (which
              was first added in 2.6.4).

              One side‐effect of incremental recursion is that any missing sub‐
              directories  inside  a  recursively‐scanned directory are (by de‐
              fault) created prior to recursing into the sub‐dirs.   This  ear‐
              lier creation point (compared to a non‐incremental recursion) al‐
              lows  rsync to then set the modify time of the finished directory
              right away (without having to delay that until a bunch of  recur‐
              sive  copying  has  finished).   However, these early directories
              don’t yet have their completed mode, mtime, or  ownership  set --
              they  have more restrictive rights until the subdirectory’s copy‐
              ing actually begins.  This early‐creation idiom can be avoided by
              using the --omit‐dir‐times option.

              Incremental recursion can be disabled using  the  --no‐inc‐recur‐
              sive (--no‐i‐r) option.

       --no‐inc‐recursive, --no‐i‐r
              Disables  the new incremental recursion algorithm of the --recur‐
              sive option.  This makes rsync scan the full file list before

Title: Rsync: Option Negation, Recursive Copying, and Incremental Recursion
Summary
This section details the use of '--no-OPTION' to disable options, emphasizing option order importance. It explains '--recursive' (-r) for directory copying, and '--inc-recursive' for incremental recursion (enabled by default in newer rsync versions), saving memory and speeding up transfer. It also lists options that disable incremental recursion and discusses the implications of early directory creation and its avoidance using '--omit-dir-times'. Finally, it mentions '--no-inc-recursive' to disable incremental recursion.