Using the --delete option with Rsync

September 1, 2014 969 views

When using the --delete option with Rsync, does this command go on a separate line or does it prepend the full rsync command syntax?
Thank you in advance.

1 Answer

You use the --delete flag on the same line, like so:

rsync -avz --delete user@ip.address:/path/to/files/ .

Remember to take care with the --delete flag. You might want to test your command with the --dry-run flag first.

Have another answer? Share your knowledge.