Difference between rsync -r S1 S2 T and cp -r S1 S2 T

Tony Abernethy tony at servacorp.com
Tue Jun 2 08:09:26 GMT 2009


Dunno for sure, but I'd expect differences if S1 is /dev

Simple case, a copy is just a copy.
Edge cases, there's lot of room for differences in exactly
what happens when things are not exactly perfect. 
Many times I use rsync because I know what it does and
I'm not exactly sure what cp will do.
These differences increase in importance with distance
between the source and destination.

> -----Original Message-----
> From: rsync-bounces+tony=servacorp.com at lists.samba.org 
> [mailto:rsync-bounces+tony=servacorp.com at lists.samba.org] On 
> Behalf Of Nobuko Three
> Sent: Tuesday, June 02, 2009 2:29 AM
> To: rsync at lists.samba.org
> Subject: Difference between rsync -r S1 S2 T and cp -r S1 S2 T
> 
> 
> The manual says rsync can be used as an improved cp command. 
> 
> If S1 and S2 are (local) source files or directories and T is 
> an (local)
> existing directory, is it safe to think that
> $ rsync -r S1 S2 T
> does the same thing as
> $ cp -r S1 S2 T
> , assuming no trailing slashes in S1, S2?
> -- 
> View this message in context: 
> http://www.nabble.com/Difference-between-rsync--r-S1-S2-T-and-
> cp--r-S1-S2-T-tp23827717p23827717.html
> Sent from the Samba - rsync mailing list archive at Nabble.com.
> 
> -- 
> Please use reply-all for most replies to avoid omitting the 
> mailing list.
> To unsubscribe or change options: 
> https://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: 
> http://www.catb.org/~esr/faqs/smart-questions.html
> 



More information about the rsync mailing list