Strange rsync behaviour

Posted by Stewie on Server Fault See other posts from Server Fault or by Stewie
Published on 2011-03-10T22:38:54Z Indexed on 2011/03/11 0:12 UTC
Read the original article Hit count: 484

Filed under:

So, I start with comparing two directories:

[root@135759 ]# rsync -av test1/ test2/
building file list ... done

sent 128 bytes  received 20 bytes  296.00 bytes/sec
total size is 6  speedup is 0.04

They both are in sync Now, let me create a file in test1 and copy it to test2

[root@135759 ]# touch test1/hello4.php
[root@135759 ]# scp test1/hello4.php  test2/hello4.php

I verify that those are same:

[root@135759 test2]# md5sum test1/hello4.php
d41d8cd98f00b204e9800998ecf8427e  hello4.php

[root@135759 test1]# md5sum test2/hello4.php
d41d8cd98f00b204e9800998ecf8427e  hello4.php

Thus, running rsync will show me 0 files. Why is the output not right ?

[root@135759 ]# rsync -avn test1/ test2/
building file list ... done
hello4.php

sent 116 bytes  received 24 bytes  280.00 bytes/sec
total size is 6  speedup is 0.04

© Server Fault or respective owner

Related posts about rsync