Article 6QK9W Rsync: Which new or updated files dir1 dir2? md5sum?

Rsync: Which new or updated files dir1 dir2? md5sum?

by
Xeratul
from LinuxQuestions.org on (#6QK9W)
Hello,

A little newbie question about rsync on ubuntu.

Code:rsync -V
rsync version 3.2.7 protocol version 31
Linux notebook 6.8.0-40-generic #40~22.04.3-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 30 17:30:19 UTC 2 x86_64 x86_64 x86_64 GNU/LinuxThere is a directory1 and directory2.
Directory1 is the in-work directory.
Directory2 is the archive with maybe too old files

How to check with rsync if Directory2 has maybe outdated files? (no modification first).

If you want to compare actual file contents, even for files which have the same size and last modification time, add the flag -c to tell rsync to compare the files using a checksum.

rsync -avnc $SOURCE $TARGET
rsync -avnc dir1 dir2

Could it do a check with the MD5SUM to be really sure?

Kind regards
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments