TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Execute a shell command each time a given file or directory changes

9 点作者 dinduks将近 12 年前

2 条评论

shabble将近 12 年前
I&#x27;m sure I&#x27;ve seen a nicely crossplatform command-line tool for this, but I can&#x27;t seem to find it. The closest (by support for non-poll APIs) seems to be &#x27;simplefilewatcher&#x27;[1], but that&#x27;s just a C++ library.<p>incron, inotify, filewatcher[2], puncher[3], guard[4] are a bunch of existing ones, but they&#x27;re all either not entirely functional cross-platform, or require some faffing with dependencies to get working.<p>[1] <a href="https://code.google.com/p/simplefilewatcher/" rel="nofollow">https:&#x2F;&#x2F;code.google.com&#x2F;p&#x2F;simplefilewatcher&#x2F;</a><p>[2] <a href="https://github.com/thomasfl/filewatcher" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;thomasfl&#x2F;filewatcher</a><p>[3] <a href="http://rawsyntax.com/blog/puncher-the-simple-file-watcher-for-os-x/" rel="nofollow">http:&#x2F;&#x2F;rawsyntax.com&#x2F;blog&#x2F;puncher-the-simple-file-watcher-fo...</a><p>[4] <a href="https://github.com/guard/guard" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;guard&#x2F;guard</a>
kseistrup将近 12 年前
I&#x27;m aware that it&#x27;s beyond the scope of cel, but I&#x27;d use incron anyday for jobs like this.
评论 #6160755 未加载
评论 #6160685 未加载