Is it possible to watch for file (content) changes based on its hash #1246
Unanswered
tukusejssirs
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I’ve just wanted to watch
/proc/acpi/button/lid/LID/state
file (it changes its content when a laptop lid is opened/closed) on Linux usingchokidar
, but it failed to watch for changes in it, as (for some reason; I didn’t bother to find the reason) doesn’t changes its stats (atime
/mtime
/ctimeare all same from a few hours ago and
btimeis not defined in
statprogram and thus in
fs.statit is set to
0` in UNIX epoch). I presume it is open for writing in the kernel.The only way I could watch for changes is using
md5sum
.IMO it would be nice if
chokidar
would support watching file changes based on the hash.Beta Was this translation helpful? Give feedback.
All reactions