Detect a file is closed
Posted
by User1
on Stack Overflow
See other posts from Stack Overflow
or by User1
Published on 2010-04-14T16:28:11Z
Indexed on
2010/04/14
16:33 UTC
Read the original article
Hit count: 327
Is there a simple way to detect when a file for writing is closed? I have a process that kicks out a new file every 5 seconds. I can not change the code for that process. I am writing another process to analyze the contents of each file immediately when it is created. Is there a simple way to watch a certain directory to see when a file is no longer opened for writing? I'm hoping for some sort of Linux command.
© Stack Overflow or respective owner