how to see which files are open?

Fleming Kraglund fk at kos.rci.dk
Thu Mar 8 09:45:37 AEST 1990


C.J.Parkin-Lilley at fulcrum.bt.co.uk (Chris Parkin Lilley [cs12]) writes:

>In article <3537 at zorba.Tynan.COM> uunet!unix.sri.com!cole (Susan Cole) writes:
>>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

>Does your system have 'fuser'. If so, you should be able to do something like
>	fuser -u /dev/dsk/whatever (a block special file)

>This should give you the pids of the processes which have a partition open,
>and 
>	fuser -k /dev/dsk/whatever

>should try and kill them off.

Please note that if you are using process accounting (assuming sysV 3.x)
then the kernel has an open file on /usr, (yes the kernel, it's the inode
on which to write the account records) and you must do a
	/usr/lib/acct/shutacct.
Hope this helps too.
-- 
                             fk at rci.dk                   (I hate .sig files)



More information about the Comp.unix mailing list