'\"macro stdmacro
.if n .pH g1a.fuser @(#)fuser	40.7.1.1 of 1/11/90
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} fuser 1M "System Administration Utilities" "\&"
.if \nX=1 .ds x} fuser 1M "System Administration Utilities"
.if \nX=2 .ds x} fuser 1M "" "\&"
.if \nX=3 .ds x} fuser "" "" "\&"
.TH \*(x}
.SH NAME
\f4fuser\f1 \- identify processes using a file or file structure
.SH SYNOPSIS
\f4/usr/sbin/fuser\f1
\f1[\f4\|\-[c|f]ku\|\f1]
\f2files\f1 | \f2resources\f1
\f1[\|[\f4\|\-\|\f1]
\f1[\f4\|\[c|f]ku\|\f1] \f4files\f1 | \f4resources\f1\|] . . .
.SH DESCRIPTION
\f4fuser\fP
outputs the process \s-1ID\s+1s of the processes
that are using the \f2files\fP or remote \f2resources\fP specified as arguments.
Each process \s-1ID\s+1 is followed by
a letter code, interpreted as follows:
if the process is using the file as
1) its current directory, the code is
\f4c\f1,
2) its root directory,
the code is
\f4r\f1,
3) an open file, 
the code is
\f4o\f1,
or 4) its text file, 
the code is
\f4t\f1.
For block special devices with mounted file systems, all processes using
any file on that device are listed.  For remote resource names, all 
processes using any file associated with that remote resource (Remote File 
Sharing) are reported.   
For all other types of files (text files, executables, directories,
devices, etc.) only the processes using that file are reported.
.PP
The following options may be used with \f4fuser\fP:
.PP
.TP
\f4\-c\f1
may be used with files that are mount points for file
systems.  With that option the report is for use of the
mount point and any files within that mounted file system.
.TP
\f4\-f\f1
when this is used, the report is only for the named
file, not for files within a mounted file system.
.TP
\f4\-u\f1
the user login name, in parentheses,
also follows the process \s-1ID\s+1.
.TP
\f4\-k\f1
the SIGKILL
signal is sent to each process.  Since this option spawns kills
for each process, the kill messages may not show up immediately
[see 
\f4kill\fP(2)].
.PP
If more than one group of files are specified, the
options may be respecified for each additional group of files.
A lone dash cancels the options currently in force.
.PP
The process \s-1ID\s+1s are printed as a single line on the standard output,
separated by spaces and terminated with a single new line.
All other output is written on standard error.
.PP
Any user with permission to read \f4/dev/kmem\f1 and \f4/dev/mem\f1 can use
\f4fuser\f1.
Only the super-user can terminate another user's process
.SH FILES
.PD 0
.TP \w'/dev/kmem\ \ \ \ 'u
\f4/stand/unix\f1
for system namelist
.TP
\f4/dev/kmem\f1
for system image
.TP
\f4/dev/mem\f1
also for system image
.PD
.SH NOTE
If an RFS resource from a pre System V Release 4 server is mounted,
\f4fuser\f1 can only report on use of the whole file system, not on
individual files within it.
.P
Because \f4fuser\f1 works with a snapshot of the system image, it
may miss processes that begin using a file while \f4fuser\f1 is
running.  Also, processes reported as using a file may have 
stopped using it while \f4fuser\f1 was running.  These factors
should discourage the use of the \f4\-k\f1 option.
.SH SEE ALSO
\f4mount\fP(1M).
.br
\f4ps\fP(1) in the
\f2User's Reference Manual\f1.
.br
\f4kill\fP(2),
\f4signal\fP(2) in the
\f2Programmer's Reference Manual\f1.
.\"	@(#)fuser.1m	6.2 of 9/2/83
.Ee
