Clean up and improve manual page for fuser(1)

- Mention option's arguments in the list of options (so that now we mention
  "-N system" instead of just "-N").
- Stylize signals and other constants like O_APPEND with Dv.
- Sort options.
- Change indentation width for readability.
- Fix a couple of typos.
- Sort symbols list.
- Use Sy instead of Cm for symbols. They are not command modifiers.
- Use Ex -std in the EXIT STATUS section for consistency with other manual
  pages.
- Use Ql instead of Dq Li for inline code examples as Li has recently been
  deprecated by mdoc.

Reviewed by:	bcr
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D25332
This commit is contained in:
0mp 2020-06-18 11:18:26 +00:00
parent babfadcf97
commit c8392f6081

View File

@ -24,7 +24,7 @@
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd May 13, 2011 .Dd June 18, 2020
.Dt FUSER 1 .Dt FUSER 1
.Os .Os
.Sh NAME .Sh NAME
@ -57,63 +57,63 @@ utility will also look through mmapped files.
The following options are available: The following options are available:
.Bl -tag -width indent .Bl -tag -width indent
.It Fl c .It Fl c
Treat files as mount point and report on any files open in the file system. Treat files as mount points and report on any files open in the file system.
.It Fl f .It Fl f
The report must be only for named files. The report must be only for named files.
.It Fl k .It Fl k
Send signal to reported processes Send signal to reported processes
.Pq SIGKILL by default . .Pq Dv SIGKILL No by default .
.It Fl m .It Fl M Ar core
Search through mmapped files too.
.It Fl u
Write the user name associated with each process to stderr.
.It Fl M
Extract values associated with the name list from the specified core Extract values associated with the name list from the specified core
instead of the default instead of the default
.Pa /dev/kmem . .Pa /dev/kmem .
.It Fl N .It Fl m
Search through mmapped files too.
.It Fl N Ar system
Extract the name list from the specified system instead of the default, Extract the name list from the specified system instead of the default,
which is the kernel image the system has booted from. which is the kernel image the system has booted from.
.It Fl s .It Fl s Ar signal
Use given signal name instead of default SIGKILL. Use given signal name instead of default
.Dv SIGKILL .
.It Fl u
Write the user name associated with each process to stderr.
.El .El
.Pp .Pp
The following symbols, written to stderr will indicate how files is used: The following symbols, written to stderr will indicate how files are used:
.Bl -tag -width MOUNT .Pp
.It Cm r .Bl -tag -width indent -compact
The file is the root directory of the process. .It Sy a
.It Cm c
The file is the current workdir directory of the process.
.It Cm j
The file is the jail-root of the process.
.It Cm t
The file is the kernel tracing file for the process.
.It Cm x
The file is executable text of the process.
.It Cm y
The process use this file as its controlling tty.
.It Cm m
The file is mmapped.
.It Cm w
The file is open for writing.
.It Cm a
The file is open as append only The file is open as append only
.Pq O_APPEND was specified . .Pq Dv O_APPEND No was specified .
.It Cm d .It Sy c
The file is the current workdir directory of the process.
.It Sy d
The process bypasses fs cache while writing to this file The process bypasses fs cache while writing to this file
.Pq O_DIRECT was specified . .Pq Dv O_DIRECT No was specified .
.It Cm s .It Sy e
Shared lock is hold.
.It Cm e
Exclusive lock is hold. Exclusive lock is hold.
.It Sy j
The file is the jail root of the process.
.It Sy m
The file is mmapped.
.It Sy r
The file is the root directory of the process.
.It Sy s
Shared lock is hold.
.It Sy t
The file is the kernel tracing file for the process.
.It Sy w
The file is open for writing.
.It Sy x
The file is executable text of the process.
.It Sy y
The process uses this file as its controlling tty.
.El .El
.Sh EXIT STATUS .Sh EXIT STATUS
The .Ex -std
.Nm
utility returns 0 on successful completion and >0 otherwise.
.Sh EXAMPLES .Sh EXAMPLES
The command: The command
.Dq Li "fuser -fu ." .Ql "fuser -fu \&."
writes to standard output the process IDs of processes that are using the writes to standard output the process IDs of processes that are using the
current directory and writes to stderr an indication of how those processes are current directory and writes to stderr an indication of how those processes are
using the directory and user names associated with the processes that are using using the directory and user names associated with the processes that are using