In this section, we will see how to use rsync and grsync to synchronize files/directories locally, as well as remotely from one system to another.
- Let's start by creating two test directories on one system and also create some test files inside one of the directories. To do this, we run the following commands:
Here, we have created two directories, dir1 and dir2, and dir1 has five empty files created inside it.
- If we want to sync the contents of dir1 to dir2 locally, we can do so by using the following command:
The -r option ...