As stated in rsync
's man page, the -a
(archive) switch is equivalent to -rlptgoD
. However, I have a situation where I don't want symbolic links retained. Is there any way to keep using the -a
switch and prevent copying of symbolic links? I could write -rptgoD
every time, but it's a bit long.
Linux – Using rsync’s archive flag without copying symbolic links
linuxrsync
Best Answer
Try the following:
or, the slightly shorter:
Note that the
--no-links
/--no-l
switch must come after the-a
switch on the command line, otherwise the--links
implied by-a
is turned back on again.