Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!apple!zorba!dtynan From: bei@puzzle.UUCP (Bob.Izenberg) Newsgroups: comp.unix Subject: Re: how to see which files are open? Message-ID: <3551@zorba.Tynan.COM> Date: 23 Feb 90 03:39:21 GMT References: <3537@zorba.Tynan.COM> Sender: dtynan@zorba.Tynan.COM Reply-To: uunet!cs.utexas.edu!puzzle!bei (Bob.Izenberg) Organization: Somewhere in Austin, Texas Lines: 32 Approved: dtynan@zorba.Tynan.COM Posted-Date: 24 Jan 90 09:44:31 GMT In article <3537@zorba.Tynan.COM> uunet!unix.sri.com!cole (Susan Cole) writes: >frustrating. There must be a way to see what processes have which >files open... I don't have the man page for fuser, but here's some of what the book says: (sharp signs inserted for safety's sake) # fuser - identify processes using a file or file structure # /etc/fuser -ku (files) (-) (-ku) (files) For block special devices, all processes using any file on that device are listed. If the -k option is specified, the SIGKILL signal is sent to each process. (If you have permission to kill it.) If the -u option is specified, the login name, in parentheses, also follows the process id. So, try this: # su # /etc/fuser -ku /dev/dsk/c1t1d1s8 # umount /dev/dsk/c1t1d1s8 The fine print qualifies the man page thusly: The command fuser works with a snapshot of the system table, which is true only for an instant. It is possible that other processes begin accessing the specified file(s) after this snapshot is taken. Does your machine have fuser? -- Bob -- ------------------------------------------------------------------------------ Bob Izenberg [ ] Ralph Kirkley Associates attctc!puzzle!bei 512 346 7019 (home) Austin, TX ------------------------------------------------------------------------------