I want to know how use rsync for sync to folders recursive but
I only need to update the new files or the updated files (only the content not the owner, group or timestamp) and I want to delete the files that not exist in the source.
Rsync ignore owner, group, time, and perms
rsync
Best Answer
I think you can use the
-no-
options torsync
to NOT copy the ownership or permissions of the files you're sync'ing.Excerpt From rsync Man Page
Ownership & Permissions
Looking through the man page I believe you'd want to use something like this:
To delete files that don't exist you can use the
--delete
switch:Timestamps
As for the timestamp I don't see a way to keep this without altering how you'd do the comparison of SOURCE vs. DEST files. You might want to tell
rsync
to ignore timestamps using this switch:Update
For timestamps,
--no-times
might do what you're looking for.