Rsync (No need to copy the time stamp)

rsync

With rsync command I want only copy/sync changed files/folder to the destination folder. I had some issue with Rsync-like whenever am executing the rsync command am copied along with the time stamp as well.

For example, my destination folder ‘Linux’ had updated on 1 month back and in my source folder there is no update info for the 'Linux' folder, but when am performing the rsync command my destination 'Linux' folder time stamp has been updated with latest source folder time stamp. I don’t want to copy the timestamp. please suggest me on this and please glance on below command which I have used.

rsync -avh /source/Linux/ /destination/Linux/ 

rsync -uan /source/Linux/ /destination/Linux/

rsync -uav /source/Linux/ /destination/Linux/

Best Answer

The -a option (--archive) implies the -t option (--times, "preserve modification times").

You may negate this option using either --no-t or --no-times after -a:

rsync -a --no-t /source/Linux/ /destination/Linux/

This would not copy the source timestamps to the destination. Note though, that rsync compares timestamps (and other metadata) to determine whether files are updated and needs copying. You may therefore want to use -u (--update) too.

Related Question