Aryan PrajapatKnowledge Contributor
What is the rsync command, and how do you use this command for synchronization?
What is the rsync command, and how do you use this command for synchronization?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Questions | Answers | Discussions | Knowledge sharing | Communities & more.
The rsync command is used to synchronize and transfer the files in Linux. It synchronizes files between two local systems, directories, or a network. The basic rsync command contains the following:
rsync
For example, let’s synchronize between Documents and the Downloads directory. For this, you need to run the following command:
rsync -av ~/Documents ~/Downloads
If you want to go one step further, then you can use the below command:
rsync -avz –delete ~/Documents ~/Downloads
In the above command:
The -a option preserves all the permissions and other attributes
The -v option displays the detailed output of the synchronization
The -z allows compression that decreases the bandwidth use.
The –delete option removes the file in the Downloads that do not exist in the Documents directory.