Monday, November 7, 2016

Sync folders with rsync

Copy everything from srcFolder to dstFolder
     rsync -va srcFolderPath/ dstFolderPath/


Copy everything from srcFolder to dstFolder and delete any files that does not exist in srcFolder

     rsync -va --delete srcFolderPath/ dstFolderPath/

Note: the trailing slash (/) of the srcFolderPath is important. If you omit it, for instance, rsync -va srcFolderPath dstFolderPath/
then a folder named "srcFolderPath" will be created and saved into dstFolderPath.

No comments:

Check clients which connect to Mac OS X Wi-Fi Internet Sharing

arp -i bridge100 -a bridge100 may be different on your Mac OSX