🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix
Article #730

Re: how to see which files are open?

#730
From: Paul S. Sawyer
Date: Fri, 23 Feb 1990 03:32
27 lines
1771 bytes
> I found myself wanting to umount a filesystem which as far as I could
> see no one was in (nor in another directory under it) but nevertheless,
> every time I tried to umount it I got "Device busy".  This was
> frustrating.  There must be a way to see what processes have which
> files open but nothing sprang to my eye when I did a 'man -k' of "files",
> "open", and "table".  Will someone please tell me what it is?  Please post
> (this is said in hopes of keeping the responses in the hundreds instead
> of the thousands).  Thanks!

On System V, it's /etc/fuser - - I don't know if there is a BSD equivalent.

You must be able to read /dev/kmem and /dev/mem, which means user root or 
group sys (on this system, anyway);  "/etc/fuser -u /dev/dsk/0s1" works, 
while "/etc/fuser -u /usr" does not seem to on this system, even though
TFM seems to indicate that it should.  (SysV.2.1)

A -k option will even kill those processes that are preventing the umount.


> -- 
> cole@unix.sri.com
> {hplabs,rutgers}!sri-unix!cole
-- 
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Paul S. Sawyer              uunet!unh!unhtel!paul     paul@unhtel.UUCP
UNH Telecommunications        attmail!psawyer       p_sawyer@UNHH.BITNET
Durham, NH  03824-3523      VOX: 603-862-3262         FAX: 603-862-2030
Technical Details
Message-ID: <3549@zorba.Tynan.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!apple!zorba!dtynan

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!apple!zorba!dtynan
From: paul@unhtel.uucp (Paul S. Sawyer)
Newsgroups: comp.unix
Subject: Re: how to see which files are open?
Message-ID: <3549@zorba.Tynan.COM>
Date: 23 Feb 90 03:32:00 GMT
Sender: dtynan@zorba.Tynan.COM
Organization: UNH Telecommunications and Network Services
Lines: 27
Approved: dtynan@zorba.Tynan.COM