Tag Archives: path

Mac – Upgrade rsync to version 3

Quick method:

change /private/etc/paths putting ahead /usr/local/...

<span style="color: #ff0000;">/usr/local/bin</span>
<span style="color: #ff0000;">/usr/local/sbin</span>
/bin
/usr/bin
/usr/sbin
/sbin

Then, unzip this precompiled rsync into /usr/local/bin

Restart the Terminal and run

rsync --version

This should be the output:

rsync version <span style="color: #ff0000;">3.0.9</span> protocol version 30
Copyright (C) 1996-2011 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, symtimes

BASH: Current Script folder

#!/bin/bash
# Name: /tmp/demo.bash : 
# Purpose: Tell in what directory $0 is stored in
# Warning: Not tested for portability 
# ------------------------------------------------

## who am i? ##
_script="$(readlink -f ${BASH_SOURCE[0]})"

## Delete last component from $_script ##
_base="$(dirname $_script)"

## Okay, print it ##
echo "Script name : $_script"
echo "Current working dir : $PWD"
echo "Script location path (dir) : $_base"

Source