Path: utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!ogicse!littlei!gandalf!andyc From: andyc@bucky.intel.com (Andy Crump) Newsgroups: comp.unix.misc Subject: Re: Who's in my Directory ? Message-ID: Date: 29 Nov 90 15:08:56 GMT References: <1990Nov21.004657.10564@mcs.kent.edu> Sender: news@littlei.UUCP Organization: Intel Corporation, Hillsboro, Oregon Lines: 26 In-reply-to: dpavlich@math-cs.kent.edu's message of 21 Nov 90 00:46:57 GMT >>>>> On 21 Nov 90 00:46:57 GMT, dpavlich@math-cs.kent.edu (Dave Pavlich) said: Dave> Is there a way on unix to find out if someone has 'cd''d into your Dave> directory ? I've tried checking processes ( almost impossible ) and I don't Dave> want to set protection on these directories. Is there a shell program or Dave> is it impossible ? In System V Release 4, the 'fuser' utility will tell you which process have a given file/directory open. The -u option also tells you the owner of the process. For example when I did '/usr/sbin/fuser -u /home2/andyc' I got: /home2/andyc: 21741c(andyc) 21630c(andyc) 21628c(andyc) 17133c(andyc) 17122c(andyc) 17120c(andyc) 789c(andyc) 696c(andyc) 694c(andyc) 693c(andyc) 692c(andyc) 687c(andyc) 684c(andyc) 683c(andyc) 674c(andyc) 651c(andyc) whoa! Not only that, its fast!!. This is similar functionality to ofiles referenced elsewhere. -- -- Andy Crump ...!tektronix!reed!littlei!andyc | andyc@littlei.intel.com ...!uunet!littlei!andyc | andyc@littlei.uu.net Disclaimer: Any opinions expressed here are my own and not representive of Intel Corportation.