rsync –a SourceDirectory DestinationDirectory
When you use rsync, the files that get copied will have a modification date of the same date that the rsync command was run. To overcome this, there is another option that you can specify in the rsync command that will preserve the timestamps during the synchronization process.
Without preserving the timestamp, the files will display the modification date and time as the time that the rsync command was run.
To do this, use the –a option instead of –r, like we used in the command above. The –a option will use recursive mode, preserve any symbolic links, preserves file and directory permissions, preserves the timestamp, and preserve the owner and group.
Source: https://www.techradar.com/how-to/computing/apple/using-rsync-to-keep-your-files-in-sync-1305698
No comments:
Post a Comment