I didn't know about entr as well but I'm using fswatch which is largely similar and portable as well, supporting not only Linux and BSD but also non-WSL Windows and Solaris too, and leveraging the Filesystem Event API on macOS.
Re:My one-liner Linux Dropbox client
by binaryapparatus on Tuesday December 25, 2018 @06:16AM
(#18756995)
Huge additional plus, entr does not rely exclusively on inotify, it is also 'BSD kqueue wrapper. It is the only command line utility that I found that allows cross platform (linux/BSD) scripting with file system events.
I have few scripts that rely on entr and I am always sure they are OS agnostic.
Then take a look at fswatch! (See sibling comment)
It's mentioned on reddit, that passing the -r flag will pick up new files, right? Link @https://www.reddit.com/r/linux/comments/a92m1u/comment/ecgqf...
EDIT Oh I see what you're saying; that's confusing, though, how's it supposed to work in the first place, then?? :))
find $ORG_DIR | entr -r rclone sync -v $ORG_DIR $REMOTE:org
is that find will enumerate all your existing files, but starting a new one won't get picked up.
It seems like entr is prepared though, and you should just pass in -d. In fact why use find at all, if you want to rsync the directory?