fenk.org

Private website of Thorsten Fenk

Remote file sync using unison and inotifywait

The following one liner watches the sync/ folder in my home directory and calls unison to syncronize it with a remote folder.

#!/bin/sh
inotifywait -mr -e close_write -e create -e delete -e move /home/fenkt/sync/ | while read DELETE CREATE MOVE ; do unison ; done