Rsync
Rsync is one of those utilities that doesn't come nativity normally. Some flavors do install it during installation of the operating system while others demand you to install it.
You don't have to install it but it is good if you need to do some special tasks.
It's meant as a utility to synchronize two directories which in turn can be done in various ways. It can do it between two servers/computers or between two local directories or even as a server for others to synchronize with your local package.
Basic Command with Options
How to use Rsync to syncronize two directories
Examples
# rm blaj/blaj2/hej
Rsync and Basic options
- R = use relative path names
- z = compress file data during the transfer
- r = recurse into directories (need to be specified by itself)
- a = archive mode; equals -rlptgoD (no -H,-A,-X)
- l = copy symlinks as symlinks
- p = preserve permissions
- g = preserve group
- o = preserve owner (super-user only)
- v = increase verbosity
- t = preserve modification times
- c = skip based on checksum, not mod-time & size
- h = output numbers in a human-readable format
- n = perform a trial run with no changes made
- S = handle sparse files efficiently
- delete-during = receiver deletes during xfer, not before
- numeric-ids = don't map uid/gid values by user/group name
- exclude = exclude files matching PATTERN