3 ms·
I hadn't seen entr before! My first glance at your one-liner: find $ORG_DIR | entr -r rclone sync -v $ORG_DIR $REMOTE:org is that find will enumerate all your
by boulos 8y ago
I hadn't seen entr before! My first glance at your one-liner:
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?
- binaryapparatus 8y agoHuge 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.
- lloeki 8y agoThen take a look at fswatch! (See sibling comment)
- lloeki 8y agoI 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. https://github.com/emcrisostomo/fswatch https://github.com/emcrisostomo/fswatch
- petepete 8y agoI love entr for running tests while I'm working, it's nice to have a tool that works reliably in any ecosystem.
- kgbme 8y agoIt'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/ecgqftv 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?? :))