rsync is a very good utility for synchronising files over a network. It works based on the delta-transfer algorithm—only data in the source that do not exist on the destination are copied over. This method saves plenty of time and bandwidth compared to the standard cp command.
Example: rsync $SRC $DST
On your local machine, you can use this to:
1. Copy files in a directory into another. Below code will match all files in the home directory that have the .txt extension and copy them all into /path/to/heaven.
rsync -v /home/login_name/*.txt /path/to/heaven
2. Copy directories (recursively) from a directory into another. The command below is similar to the previous, except that all directories (and their contents) are copied as well.
rsync -vr /home/login_name/* /path/to/heaven
mahmudin ashar
on Jul 21st, 2010
@ 10:49 pm:
yes, i think rsync is good. do you have any example how rsync work with other operating linux (windows maybe)?
arimbun
on Jul 22nd, 2010
@ 6:50 pm:
I looked it up and rsync works pretty much on all Linux distributions, but on Windows you’ll probably need to install utilities to allow UNIX commands to execute, such as cygwin.