A quick, simple, and swashbuckling tool for synchronizing directories
There's an Arch Linux package on the aur: https://aur.archlinux.org/packages/yarsync/
Otherwise clone this repository and move yarsync somewhere in your path, or call it directly.
yarsync requires rsync as well as inotifywait from inotify-tools.
Specify src and dest directories, and yarsync will keep dest synchronized with src until exited. dest can be a network directory over ssh, like below:
yarsync ship/ seven@sea.s:~/ &
touch ship/cannon.ball
# cannon.ball now exists in both ship/cannon.ball and seven@sea.s:~/ship/cannon.ball
# changes to ship/cannon.ball will be mirrored in seven@sea.s:~/ship/cannon.ballSee yarsync -h for a list of all options.
-
yarsync --delete src destwill delete files indestif they aren't insrcto keep both sides ship-shape. -
yarsync --exclude=swabbie src destwill exclude the file/directoryswabbiefrom synchronization.--excludecan be specified multiple times.