sync folders using rsync code example Example: rsync sync remote dir rsync -a ~/dir1 username@remote_host:destination_directory