in reply to List who has a file open?

You might be able to pull such info out of /proc or whatever your OS-equivalent might be, but it's undoubtably easier to system or exec an external binary like fstat (BSD), fuser (Solaris), lsof (generic Unicies) ... I'm sure similar tools exist for other OSes.

    --k.


Replies are listed 'Best First'.
Re: Re: List who has a file open?
by theorbtwo (Prior) on Jan 25, 2002 at 11:09 UTC
      thanks! Found the Pstools set that will help out with the PC side of things!
Re: Re: List who has a file open?
by Anonymous Monk on Jan 25, 2002 at 05:14 UTC
    redhat , mandrake, and debian linux distros as well as solairs and probbably other Unices include fuser, which is my tool of choice for obtaining this info, from the man page : 'fuser displays the PIDs of processes using the specified files or file systems. In the default display mode, each file name is followed by a letter denoting the type of access' -Tom