Who's in my Directory ?

Jonathan I. Kamens jik at athena.mit.edu
Thu Nov 22 05:58:12 AEST 1990


In article <1990Nov21.013355.16798 at maverick.ksu.ksu.edu>, jxf at 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 at decuac.dec.com>, mjr at 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 at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710



More information about the Comp.unix.misc mailing list