Who's in my Directory ?
Andy Crump
andyc at bucky.intel.com
Fri Nov 30 02:08:56 AEST 1990
>>>>> On 21 Nov 90 00:46:57 GMT, dpavlich at 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 at littlei.intel.com
...!uunet!littlei!andyc | andyc at littlei.uu.net
Disclaimer: Any opinions expressed here are my own and
not representive of Intel Corportation.
More information about the Comp.unix.misc
mailing list