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 :)

link|improve this question
feedback

2 Answers

up vote 4 down vote accepted

Try the following:

rsync -a --no-links ...

or, the slightly shorter:

rsync -a --no-l ...

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.

link|improve this answer
feedback

No. You could use an alias instead. Put the line

alias mrsync="rsync -rptgoD"

inside your ~/.profile and after the next login, you can call just mrsync and have these parameters implicit with the alias.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.