a shell to real-time rsync
-
make sure rsync and inotify-tools installed
-
replace the SRC and DST to your config in inotify_rsync.sh
# The source dir you want to rsync SRC=/home/danny/mycode/
# The destination dir you want to rsync to. [email protected]:/home/danny/test/
### Simple Rsycn Once Without Real-time
/usr/bin/rsync --delete-after -avzP -e ssh [email protected]:/home/danny/test/ /home/danny/test/
### Usage
nohup ./inotify_rsync.sh >output 2>&1 &