Path: utzoo!utgpu!watserv1!watmath!att!att!pacbell.com!ucsd!usc!zaphod.mps.ohio-state.edu!ncar!gatech!purdue!haven!decuac!hussar.dco.dec.com!mjr From: mjr@hussar.dco.dec.com (Marcus J. Ranum) Newsgroups: comp.unix.misc Subject: Re: Who's in my Directory ? Message-ID: <1990Nov21.014439.11399@decuac.dec.com> Date: 21 Nov 90 01:44:39 GMT References: <1990Nov21.004657.10564@mcs.kent.edu> Sender: news@decuac.dec.com (Network News) Organization: Digital Equipment Corp., Washington Ultrix Resource Center Lines: 18 In article <1990Nov21.004657.10564@mcs.kent.edu> dpavlich@math-cs.kent.edu (Dave Pavlich) writes: > Is there a way on unix to find out if someone has 'cd''d into your > directory ? 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. mjr. -- "When choosing between two evils, give preference to the council of your tummy over that of your testes. The history of mankind is full of disasters that could have been averted by a good meal, followed by a nap on the couch." -Me, as explained to me by my wife's cat Strummer.