watching all activity on a file?
Bruce Dawson
jbd at codemeta.com
Fri Dec 21 07:53:58 EST 2007
Bill McGonigle wrote:
> On Dec 20, 2007, at 18:37, Kevin D. Clark wrote:
>
>
>> How about:
>>
>> while inotifywait -e modify /file/you/are/interested/in; do
>> lsof /file/you/are/interested/in >>/tmp/logfile
>> date >>/tmp/logfile
>> done
>>
>
> If it were someone editing a file, that would be a great solution.
> In this particular case I'm trying to catch an unlink - my hunch is
> lsof woudn't show anything.
How about monitoring the directory containing the file?
(/file/you/are/interested instead of /file/you/are/interested/in)
--Bruce
More information about the gnhlug-discuss
mailing list