in reply to Re: Re: Daemon To Check For Files
in thread Daemon To Check For Files

It's no worse than what he's already doing. Is there a way to ask the OS if any process has a file open for writing? I don't know of a way to do it off the top of my head. I think you'd need cooperation from the process doing the writing, which this person doesn't have.

Replies are listed 'Best First'.
Re: Re: Re: Re: Daemon To Check For Files
by Roger (Parson) on Nov 05, 2003 at 03:39 UTC
    Hi perrin, on the unix system, use fuser (system V), fstat (BSD), pff (public domain) to find out various things about processes using a particular file (or files).

    I responded to your post earlier simply because I thought just checking a file's size to find out if it is still being written to is not a reliable method, not really related to the original post.

      Thanks, fuser seems to be on my Red Hat system, and looks easy to use.