http://qs1969.pair.com?node_id=11113793


in reply to Re: Polling a file for changes - Best Practices?
in thread Polling a file for changes - Best Practices?

What linux package provides `inotifywait`. Looks like inotify-tools from sourceforge, but I can't find it in any typical repo?? I'm looking at a github repo right now, but this doesn't feel mainstream...

Tommy
A mistake can be valuable or costly, depending on how faithfully you pursue correction
  • Comment on Re^2: Polling a file for changes - Best Practices?

Replies are listed 'Best First'.
Re^3: Polling a file for changes - Best Practices?
by choroba (Cardinal) on Mar 04, 2020 at 23:29 UTC
    Yes, it comes from sourceforge, but openSUSE provides it as a rpm package.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

      Hmmm. Sadly not RHEL.

      Tommy
      A mistake can be valuable or costly, depending on how faithfully you pursue correction

        I don't know if you're comfortable with these sources or if these match the version of RHEL that you are using, but I found some RHEL RPMs for inotifywait at here and at https://rpm.pbone.net. (I tried putting in the link to the search results for 'lnotifywait' and all of the 'RHEL' options for the second site, but the link has square brackets and I couldn't figure out how to get that to work with PerlMonks' markup.)

Re^3: Polling a file for changes - Best Practices?
by hippo (Bishop) on Mar 05, 2020 at 09:21 UTC
    but this doesn't feel mainstream...

    There's a whole world of really good stuff which isn't "mainstream". Think for a moment how much of CPAN isn't in core. Does that stop you using those modules? Think how many Perl modules exist which are not provided as RedHat packages (that situation was really dire with RHEL5 and earlier and is only slightly better today). If you reach beyond the mainstream you will find a panoply of wondrous experiences.

    If you wanted something with a RedHat official seal of approval then this should have been stated up front in the OP. But there you already say you are using Mojolicious, websockets, etc. and your task doesn't sound particularly mainstream to me. Why the sudden aversion to downloading and installing inotifywait?

      "mainstream" was probably the wrong word to use. As I stated up front, I'm looking for best practices. It probably would have been more accurate for me to state at that it doesn't appear that there are very many best practices for this, which surprises me because it seemed to me like something common enough that it would have a recommended design pattern (at least in Perl)...

      To your point, I very well may have to go with something a little off the beaten path in order to achieve what's needed for this project. That's probably going to be just fine. I was somewhat hopeful that there were some more established guidelines and how to go about this, given that it felt like a kind of common need.

      Instead, I'm saying a lot of potentially great options, which isn't so bad! :-)

      Tommy
      A mistake can be valuable or costly, depending on how faithfully you pursue correction