Path: utzoo!attcan!uunet!bu.edu!snorkelwacker.mit.edu!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.misc Subject: Re: Who's in my Directory ? Message-ID: <1990Nov21.185812.19152@athena.mit.edu> Date: 21 Nov 90 18:58:12 GMT References: <1990Nov21.004657.10564@mcs.kent.edu> <1990Nov21.013355.16798@maverick.ksu.ksu.edu> Sender: daemon@athena.mit.edu (Mr Background) Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Organization: Massachusetts Institute of Technology Lines: 26 In article <1990Nov21.013355.16798@maverick.ksu.ksu.edu>, jxf@castor.cis.ksu.edu (Jerry Frain) writes: |> It isn't possible in any conventional way that I know of, however, a |> friend of mine once create an 'ls' binary that he placed in his home |> directory which logged a message to some predetermined log file, and |> then exec'd /bin/ls with the original arguments. In article <1990Nov21.014439.11399@decuac.dec.com>, mjr@hussar.dco.dec.com (Marcus J. Ranum) writes: |> I don't know a neat way to do this, but when I'm trying to get |> people off a filesystem I want to unmount, I use "ps -aeww | grep directory" |> which *sometimes* catches it, if the person is using a shell that keeps |> a $CWD or something like that in the environment. |> |> Otherwise, the only approaches I can think of involve rummaging |> around in the user structs. :( u_cdir, and follow the gnode. Both of these are correct, but a better answer is that the "ofiles" program can tell you both which processes have a given directory open as their current working directory, and which processes are accessing a particular filesystem. "Ofiles" is available at an comp.sources.unix archive near you, in volume 18. -- Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710