Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
rsync will scan all the files specified for changes, and after that is complete, it will transfer ONLY the changes in the files over the link to the destination.
So when keeping multiple machines in sync, especially when they are seperated by some sort of WAN connection the rsync method will definately take less time and less bandwidth.
When you are transfering between two folders on hard drives on the same machine the differences will not be as noticeable.
When doing backups, you would only use "cp" if you didn't know how "rsync" works. I'm not 100% how rsync works myself, but I do know how to read manpages and create scripts. I use rsync in the ~/bin/backup.sh script I created. I don't really remember how it works, I just know it does the job.
(I would post the script, but I'm not at home right now.)
Using rsync locally for one file at a time doesn't make a lot of sense unless you have a large file whose contents change only in part between copies and you are copying to a device which can read fast, but has a very slow write speed. In this case, rsync is great
rsync is good locally for working out which files need to be copied in large trees of files, and only copying those which nee to be copied. It's at it's best working across a network (where the network is slower than the write speed of the target device), since it does a fairly efficient check of which files need updating, and only sends parts of files which are new (well, ok, it also sends some checking info as well...).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.