Home Explore Blog CI



man-pages

31th chunk of `rsync.man`
c252cb5ba0f0a5c0518807bc7586f93f160bb58b71c1fb580000000100000fe1
 in
              some circumstances (see also the --numeric‐ids option for a  full
              discussion).

       --devices
              This  option  causes rsync to transfer character and block device
              files to the remote system to recreate these devices.  If the re‐
              ceiving rsync is not being run as the super‐user, rsync  silently
              skips creating the device files (see also the --super and --fake‐
              super options).

              By default, rsync generates a "non‐regular file" warning for each
              device file encountered when this option is not set.  You can si‐
              lence the warning by specifying --info=nonreg0.

       --specials
              This option causes rsync to transfer special files, such as named
              sockets  and  fifos.   If the receiving rsync is not being run as
              the super‐user, rsync silently skips creating the  special  files
              (see also the --super and --fake‐super options).

              By default, rsync generates a "non‐regular file" warning for each
              special  file  encountered  when this option is not set.  You can
              silence the warning by specifying --info=nonreg0.

       -D     The -D option is equivalent to "--devices --specials".

       --copy‐devices
              This tells rsync to treat a device on the sending side as a regu‐
              lar file, allowing it to be copied to a normal  destination  file
              (or another device if --write‐devices was also specified).

              This option is refused by default by an rsync daemon.

       --write‐devices
              This  tells  rsync  to  treat a device on the receiving side as a
              regular file, allowing the writing of file data into a device.

              This option implies the --inplace option.

              Be careful using this,  as  you  should  know  what  devices  are
              present  on  the  receiving side of the transfer, especially when
              running rsync as root.

              This option is refused by default by an rsync daemon.

       --times, -t
              This tells rsync to transfer modification times  along  with  the
              files  and  update  them on the remote system.  Note that if this
              option is not used, the optimization  that  excludes  files  that
              have  not  been  modified  cannot be effective; in other words, a
              missing -t (or -a) will cause the next transfer to behave  as  if
              it  used  --ignore‐times  (-I),  causing  all files to be updated
              (though rsync’s delta‐transfer algorithm  will  make  the  update
              fairly  efficient  if  the files haven’t actually changed, you’re
              much better off using -t).

              A modern rsync that is using transfer protocol 30 or 31 conveys a
              modify time using up to 8‐bytes. If rsync is forced to  speak  an
              older  protocol (perhaps due to the remote rsync being older than
              3.0.0) a modify time is conveyed using 4‐bytes. Prior  to  3.2.7,
              these  shorter values could convey a date range of 13‐Dec‐1901 to
              19‐Jan‐2038.  Beginning with 3.2.7, these 4‐byte values now  con‐
              vey  a date range of 1‐Jan‐1970 to 7‐Feb‐2106.  If you have files
              dated older than 1970, make sure your rsync executables  are  up‐
              graded so that the full range of dates can be conveyed.

       --atimes, -U
              This tells rsync to set the access (use) times of the destination
              files to the same value as the source files.

              If  repeated,  it  also sets the --open‐noatime option, which can
              help you to make the sending and receiving systems have the  same
              access  times  on  the  transferred  files without needing to run
              rsync an extra time after

Title: Rsync Options: Devices, Specials, Times, and Access Times
Summary
This section details rsync options including '--devices' for transferring device files, '--specials' for special files, and '-D' as a shortcut for both. '--copy-devices' and '--write-devices' allow treating devices as regular files for copying. '--times' or '-t' transfers modification times, crucial for file update optimization. '--atimes' or '-U' sets destination access times to match the source, with a repeated use also setting '--open-noatime' to ensure consistent access times between systems without needing an extra rsync run.