Upgrade rsync on Mac OS X

By default, Apple decided to ship version 2.6.9 of rsync with Mac OS X 10.11 El Capitan. For the most part it gets the job done, however, not so long ago I came across the problem of having to sync directories between remote hosts that have whitespaces in their names. The usual “-s” parameter which I tend to use under Linux does the trick, but as it turns out it had been introduced in a later version of rsync, so in order for me to use it under OSX, an update was necessary.

How should we do this? Well, first we’ll download the source tarball from the rsync website, unpack and compile it, after which we will move it to a location that is safe system-wise, meaning that future OS X updates won’t break our hard work.

Download the lates source code from here:

https://rsync.samba.org/ftp/rsync/

As of writing the current version is rsync-3.1.2.tar.gz, but the steps should be future-proof for the most part.

Hit up a Terminal and issue the following:

cd ~/Downloads/ && tar -xzvf rsync-*?.tar.gz
rm rsync-*?.tar.gz
cd rsync-*?
./prepare-source
./configure
make
make install

Don’t forget to close your current terminal sessions, as the changes only take effect upon next login which is in our case the next time we open the Terminal.


Thanks for reading! Please consider Buying me a Coffee or checking out Colibri!