bob@primesun.uucp (10/13/85)
I know the FUSER command exists for Sys V, which can determine if any processes have a file open. But is there an equivalent thing for 4.2? I need to be able to give a filename or directory as an argument, and find out if ANYTHING has the file or directory open. Help? Bob Pellegrino decvax!genrad!mit-eddie!primesun!bobsun!bob
chris@umcp-cs.UUCP (Chris Torek) (10/18/85)
Did not someone post an `fuser' for 4.2 some time ago? But in any case, it is relatively trivial, though you will need access to /dev/kmem. To find out whether anyone has a file or directory open, find its inode, then search the kernel file and inode tables. `ps' and `pstat' sources are examples of programs that search about in kernel data structures. The real question is *why* you need to do this.... -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@mimsy.umd.edu