Skip to content
Simplistic rsync-based filesystem synchronization utility
Branch: master
Clone or download
Latest commit 48e8906 Apr 11, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
dircopy Add missing files Apr 11, 2019
fpsync Add missing files Apr 11, 2019
fpsyncrc.excludes Updates Apr 11, 2019
syncme Add missing files Apr 11, 2019


Simplistic rsync-based filesystem synchronization utility.

WARNING: While I use these tools every single day and have done so for nearly 20 years, they are destructive, have no error checking, can and will eat your entire home directory if misused.

There's a core rsync wrapper that does all the low-level work, dircopy, and it's called by two other "everyday" tools:

  • fpsync: meant to keep a whole home directory in sync between multiple computers, listing all subdirs and files to sync and exclusion patterns.

  • syncme: meant to sync a single directory (the current one) between two computers.

For convenience, I call this via a utility wrapper in bash and in most cases, a couple of shorthand aliases. Modify the below to suit your needs and put it into your .bashrc:

# Convenience fpsync wrapper with message, wait and timing
function hsync {
    local host=${1:-"longs"}
    local mode=${2:-"sync"}

    if [[ "$mode" == "up" ]]; then
        echo "*** Destructive upload to: $host"
    elif [[ "$mode" == "down" ]]; then
        echo "*** Destructive download from: $host"
        echo "*** Two-way sync with: $host"
    echo "*** Sleeping for 2 seconds..."
    sleep 2
    time fpsync --host $host $mode


# Sync with longs (my server, configured in my .ssh/config file)
alias longssync-up='hsync longs up'
alias longssync-down='hsync longs down'
You can’t perform that action at this time.