[GTALUG] Watching a network folder: is there a smart way of doing this?

Russell Reiter rreiter91 at gmail.com
Sun Feb 19 17:10:48 EST 2017


On Feb 17, 2017 3:41 PM, "Stewart C. Russell via talk" <talk at gtalug.org>
wrote:

I need to watch a folder on a network share (a scanner) and see when new
files are created. There are a couple of special things about this location:

<snip>

I was naïvely hoping for a mechanism that would report “Hey, you have a
new file called $filename” but that seems to have been a pipedream. What
do People Who Actually Know What They're Doing use, please?

If all you need is a count, maybe you could tee the scanner output and drop
one copy in the bit bucket. At the same time you grep ps's output for the
process writing to /dev/null. Snarf the PID to a count file, one PID to a
line. You don't get a timestamp but you do get unique ID and you can keep a
running total.


Russell

Sent from semi-resurrected Moto XT1060
Almost ready to mod.



cheers,

 Stewart

---
Talk Mailing List
talk at gtalug.org
https://gtalug.org/mailman/listinfo/talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/talk/attachments/20170219/bc46589a/attachment.html>


More information about the talk mailing list