serhii.net

In the middle of the desert you can say anything you want

06 Aug 2024

rsync on file changes with inotifywatch

inotifywait(1) - Linux man page

#!/bin/sh
while inotifywait --format '%:e %f' p.* *.bib; do
  sleep 1  # files get moved often
  echo "rsync!"
  rsync -avzirh --progress  p.* *.bib me@server.net:dir
done
Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus