Terminal command to sync two directories on separate drives?

Discussion in 'Mac Basics and Help' started by 131215, Dec 25, 2015.

  1. 131215 macrumors newbie

    Joined:
    Dec 15, 2015
    #1
    What terminal command can I use to sync two directories. One is on the local HDD. The other one will be on flash drive or SD card?
     
  2. MacUser2525 macrumors 68000

    MacUser2525

    Joined:
    Mar 17, 2007
    Location:
    Canada
    #2
    rsync -avP /path/to/first/directory_to_be_synced /path/to/second/ if there are spaces in the path then they need to be escaped or a " put around the path. rsync -avP /path/to/first/directory\ to\ be\ synced /path/to/second/ or rsync -avP "/path/to/first/directory to be synced" /path/to/second/.
     

Share This Page