LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Mobile (https://www.linuxquestions.org/questions/linux-mobile-81/)
-   -   rsync without copying files when the only difference is the time time (https://www.linuxquestions.org/questions/linux-mobile-81/rsync-without-copying-files-when-the-only-difference-is-the-time-time-4175438437/)

centguy 11-23-2012 09:32 AM

rsync without copying files when the only difference is the time time
 
How to ask rsync not to copy files from A to B when the only difference is
in the creation time and probably permission ?

I have this problem when I used scp rather than rsync to copies files.
Later when I tried to rsync -av --delete, it seems I have to redo what scp has done just
because the time stamp is different ! Imagine I spend hours to scp
the huge across different platforms.

Thanks!

acid_kewpie 11-23-2012 09:42 AM

well you can use the --checksum option but that involves.... well... a checksum being calculated for each file. by default rsync will copy on different times and sizes, the only other thing to go on is the contents of the file itself, which would most easily be a checksum.

Actually though, maybe you want this, for a looser perspective...

Code:

--size-only
Normally rsync will skip any files that are already the same length and have the same time-stamp. With
the --size-only option files will be skipped if they have the same size, regardless of timestamp. This
is useful when starting to use rsync after using another mirroring system which may not preserve
timestamps exactly.

Be very aware of the danger that you're opening yourself up to there though.

centguy 12-01-2012 08:15 PM

Thanks for the reply. I created the thread because I was waiting for the rsync process to be completed. However, it seems the second round of

rsync -rltgoDv --delete --modify-window=1

is rather quick. I guess the rsync first works out checksum and decides to skip the copying the content but update only the time stamps /permission etc ?


All times are GMT -5. The time now is 12:03 PM.