Posted By

jlmarks on 03/11/15


Tagged

Bash rsync commandline linux ssh cron


Versions (?)

rsync example to sync between two computers


 / Published in: Bash
 

  1. #!/usr/bin/env bash
  2.  
  3. # this code will sync ~/mycode between my personal computers
  4. rsync -urtP -e "ssh" 192.168.1.110:~/mycode/ /remote/pathTo/mycode/
  5. rsync -urtP /remote/pathTo/mycode/ -e "ssh" 192.168.1.110:~/mycode/
  6.  
  7. # I am unsure why the -e "ssh" was I remember that it was
  8. # neccessary to use that.

Report this snippet  

You need to login to post a comment.