The rsync utility is used to copy and synchronize files both locally and remotely in Unix systems. Can be used to perform backups and mirroring between machines. It takes in two arguments, a source followed by a destination. Their absolute paths are used if the file transfer is local.
In the example above, the directory test1 is transferred to test2. This is an example of a local transfer using rsync. If a destination location was not already created, it would be created by the utility.