[
.B \-?abChlnNOPRtUvVX
] [
-.BI -A " A"
+.BI \-A " A"
] [
.BI \-c " c"
] [
field identifier character following the
.B \-F
option.
-When ambiguity is possible, start a new option with a `-'
+When ambiguity is possible, start a new option with a `\-'
character \- e.g., ``\fB\-F \-n\fP''.
If the next option is a file name, follow the possibly ambiguous
-option with ``--'' \- e.g., ``\fB\-F -- \fIname\fR''.
+option with ``\-\-'' \- e.g., ``\fB\-F \-\- \fIname\fR''.
.PP
Either the `+' or the `\-' prefix may be applied to a group of options.
Options that don't take on separate meanings for each
prefix \- e.g., \fB\-i\fP \- may be grouped under either prefix.
-Thus, for example, ``+M -i'' may be stated as ``+Mi'' and the group
+Thus, for example, ``+M \-i'' may be stated as ``+Mi'' and the group
means the same as the separate options.
Be careful of prefix grouping when one or more options in the group
does take on separate meanings under different prefixes \-
-e.g., \fB+|\-M\fP; ``-iM'' is not the same request as ``\-i +M''.
+e.g., \fB+|\-M\fP; ``\-iM'' is not the same request as ``\-i +M''.
When in doubt, use separate options with appropriate prefixes.
.TP \w'names'u+4
.B \-? \-h
.IP
A file descriptor number range may be in the set as long as
neither member is empty, both members are numbers, and the ending
-member is larger than the starting one \- e.g., ``0-7'' or ``3-10''.
+member is larger than the starting one \- e.g., ``0\-7'' or ``3\-10''.
Ranges may be specified for exclusion if they have the `^' prefix \-
-e.g., ``^0-7'' excludes all file descriptors 0 through 7.
+e.g., ``^0\-7'' excludes all file descriptors 0 through 7.
.IP
Multiple file descriptor numbers are joined in a single ORed set before
participating in AND option selection.
section and the sections that follow it for more information on this
option.
.IP
-.B -D
+.B \-D
must be followed by a function letter; the function letter may optionally
be followed by a path name.
.I Lsof
.B \-f
is specified by itself, all path name arguments will be taken to be
simple files.
-Thus, for example, the ``\fB\-f\fP\ -- /'' arguments direct lsof to search
+Thus, for example, the ``\fB\-f\fP\ \-\- /'' arguments direct lsof to search
for open files with a `/' path name, not all open files in the `/'
(root) file system.
.IP
.B \-f
are properly terminated and aren't followed by a character (e.g., of
the file or file system name) that might be taken as a parameter.
-For example, use ``--'' after
+For example, use ``\-\-'' after
.B +f
and
.B \-f
as in these examples.
.IP
.nf
- $ lsof +f -- /file/system/name
- $ lsof -f -- /file/name
+ $ lsof +f \-\- /file/system/name
+ $ lsof \-f \-\- /file/name
.fi
.IP
The listing of information from kernel file structures, requested with the
.nf
.br
- -i6 \- IPv6 only
+ \-i6 \- IPv6 only
.br
TCP:25 \- TCP and port 25
.br
.br
TCP@lsof.itap:513 \- TCP, port 513 and host name lsof.itap
.br
- tcp@foo:1-10,smtp,99 \- TCP, ports 1 through 10,
+ tcp@foo:1\-10,smtp,99 \- TCP, ports 1 through 10,
service name \fIsmtp\fP, port 99, host name foo
.br
- tcp@bar:1-smtp \- TCP, ports 1 through \fIsmtp\fP, host bar
+ tcp@bar:1\-smtp \- TCP, ports 1 through \fIsmtp\fP, host bar
.br
:time \- either TCP, UDP or UDPLITE time service port
.fi
It is also useful when login name lookup is working improperly or slowly.
.TP \w'names'u+4
.BI +|\-L " [l]"
-enables (`+') or disables (`-') the listing of file link
+enables (`+') or disables (`\-') the listing of file link
counts, where they are available \- e.g., they aren't available
for sockets, or most FIFOs and pipes.
.IP
to display offset at all times with a decimal digit count of 10, use:
.IP
.nf
- -o -o 10
+ \-o \-o 10
or
- -oo10
+ \-oo10
.fi
.IP
The default number of digits allowed after ``0t'' is normally 8,
Idle, use:
.IP
.nf
- \-iUDP -sUDP:Idle
+ \-iUDP \-sUDP:Idle
.fi
.IP
State names vary with UNIX dialects, so it's not possible to
and it must be explicitly selected again in the characters following
.BR \-T .
(In effect, then, the default is equivalent to
-.BR -Ts .)
+.BR \-Ts .)
For example, if queue lengths and state are desired, use
.BR \-Tqs .
.IP
option or compile\-time option prevents the listing of the open file
containing the located search item.
.IP
-For example, ``lsof -V -iTCP@foobar -a -d 999'' may not report a
+For example, ``lsof \-V \-iTCP@foobar \-a \-d 999'' may not report a
failure to locate open files at ``TCP@foobar'' and may not list
any, if none have a file descriptor number of 999.
A similar situation arises when HASSECURITY and HASNOSOCKSECURITY are
defined at compile time and they prevent the listing of open files.
.TP \w'names'u+4
.B +|\-w
-Enables (\fB+\fP) or disables (\fB-\fP) the suppression of warning messages.
+Enables (\fB+\fP) or disables (\fB\-\fP) the suppression of warning messages.
.IP
The
.I lsof
scanning the directory (\fB+d\fP) or directory tree (\fB+D\fP).
.IP
If
-.B -x
+.B \-x
is specified by itself without a following parameter, cross\-over
processing of both symbolic links and file system mount points is
enabled.
Note that when
.B \-x
-is specified without a parameter, the next argument must begin with '-'
+is specified without a parameter, the next argument must begin with '\-'
or '+'.
.IP
The optional 'f' parameter enables file system mount point cross\-over
These are path names of specific files to list.
Symbolic links are resolved before use.
The first name may be separated from the preceding options with
-the ``--'' option.
+the ``\-\-'' option.
.IP
If a
.I name
SECURITY\-CONTEXT
is the SELinux security context.
This column must be selected with the
-.B -Z
+.B \-Z
option.
Note that the
-.B -Z
+.B \-Z
option is inhibited when SELinux is disabled in the running Linux
kernel.
.TP
.IP
or the local and remote Internet addresses of a network file;
the local host name or IP number is followed by a colon (':'), the
-port, ``->'', and the two\-part remote address;
+port, ``\->'', and the two\-part remote address;
IP addresses may be reported as numbers or names, depending on the
.BR +|\-M ,
.BR \-n ,
.IP
or ``STR'', followed by the stream name;
.IP
-or a stream character device name, followed by ``->'' and the stream name
-or a list of stream module names, separated by ``->'';
+or a stream character device name, followed by ``\->'' and the stream name
+or a list of stream module names, separated by ``\->'';
.IP
or ``STR:'' followed by the SCO OpenServer stream device and module
-names, separated by ``->'';
+names, separated by ``\->'';
.IP
-or system directory name, `` -- '', and as many components of the path
+or system directory name, `` \-\- '', and as many components of the path
name as
.I lsof
can find in the kernel's name cache for selected dialects
.B "KERNEL NAME CACHE"
section for more information.);
.IP
-or ``PIPE->'', followed by a Solaris kernel pipe destination address;
+or ``PIPE\->'', followed by a Solaris kernel pipe destination address;
.IP
or ``COMMON:'', followed by the vnode device information structure's
device name, for a Solaris common vnode;
.IP
or ``dgram'' or ``stream'' for the type UnixWare 7.1.1 and above in\-kernel
UNIX domain sockets, followed by a colon (':') and the local path name
-when available, followed by ``->'' and the remote path name or kernel
+when available, followed by ``\->'' and the remote path name or kernel
socket address in hexadecimal when available;
.IP
or the association value, association index, endpoint value, local address,
.I lsof
will add ``(FA:<address1><direction><address2>)'' to the NAME column.
<address1> and <address2> are hexadecimal vnode addresses.
-<direction> will be ``<-'' if <address2> has been fattach'ed to
+<direction> will be ``<\-'' if <address2> has been fattach'ed to
this vnode whose address is <address1>;
-and ``->'' if <address1>, the vnode address of this vnode, has been
+and ``\->'' if <address1>, the vnode address of this vnode, has been
fattach'ed to <address2>.
<address1> may be omitted if it already appears in the DEVICE column.
.PP
incantation to see if it reports any alternate device numbers:
.PP
.IP
-lsof -b
+lsof \-b
.PP
Look for standard error file warning messages that
begin ``assuming "dev=xxxx" from ...''.
If
.I lsof
can't report all components in a path, it reports in the NAME column
-the file system name, followed by a space, two `-' characters, another
+the file system name, followed by a space, two `\-' characters, another
space, and the name components it has located, separated by
the `/' character.
.PP
.PP
To list all open Internet, x.25 (HP\-UX), and UNIX domain files, use:
.IP
-lsof -i -U
+lsof \-i \-U
.PP
To list all open IPv4 network files in use by the process whose PID is
1234, use:
.IP
-lsof -i 4 -a -p 1234
+lsof \-i 4 \-a \-p 1234
.PP
Presuming the UNIX dialect supports IPv6, to list only open IPv6
network files, use:
.IP
-lsof -i 6
+lsof \-i 6
.PP
To list all files using any protocol on ports 513, 514, or 515 of host
wonderland.cc.purdue.edu, use:
.IP
-lsof -i @wonderland.cc.purdue.edu:513-515
+lsof \-i @wonderland.cc.purdue.edu:513\-515
.PP
To list all files using any protocol on any port of mace.cc.purdue.edu
(cc.purdue.edu is the default domain), use:
.IP
-lsof -i @mace
+lsof \-i @mace
.PP
To list all open files for login name ``abe'', or user ID 1234, or
process 456, or process 123, or process 789, use:
.IP
-lsof -p 456,123,789 -u 1234,abe
+lsof \-p 456,123,789 \-u 1234,abe
.PP
To list all open files on device /dev/hd4, use:
.IP
.PP
To send a SIGHUP to the processes that have /u/abe/bar open, use:
.IP
-kill -HUP `lsof -t /u/abe/bar`
+kill \-HUP `lsof \-t /u/abe/bar`
.PP
To find any open file, including an open UNIX domain socket file,
with the name
.IR /nfs/mount/point ,
use:
.IP
-lsof -b /nfs/mount/point
+lsof \-b /nfs/mount/point
.PP
To do the preceding search with warning messages suppressed, use:
.IP
-lsof -bw /nfs/mount/point
+lsof \-bw /nfs/mount/point
.PP
To ignore the device cache file, use:
.IP
-lsof -Di
+lsof \-Di
.PP
To obtain PID and command name field output for each process, file
descriptor, file device number, and file inode number for each file
of each process, use:
.IP
-lsof -FpcfDi
+lsof \-FpcfDi
.PP
To list the files at descriptors 1 and 3 of every process running the
.I lsof
command for login ID ``abe'' every 10 seconds, use:
.IP
-lsof -c lsof -a -d 1 -d 3 -u abe -r10
+lsof \-c lsof \-a \-d 1 \-d 3 \-u abe \-r10
.PP
To list the current working directory of processes running a command that
is exactly four characters long and has an 'o' or 'O' in character three,
.BI \-c " c"
option:
.IP
-lsof -c /^..o.$/i -a -d cwd
+lsof \-c /^..o.$/i \-a \-d cwd
.PP
To find an IP version 4 socket file by its associated numeric dot\-form
address, use:
.IP
-lsof -i@128.210.15.17
+lsof \-i@128.210.15.17
.PP
To find an IP version 6 socket file (when the UNIX dialect supports
IPv6) by its associated numeric colon\-form address, use:
.IP
-lsof -i@[0:1:2:3:4:5:6:7]
+lsof \-i@[0:1:2:3:4:5:6:7]
.PP
To find an IP version 6 socket file (when the UNIX dialect supports
IPv6) by an associated numeric colon\-form address that has a run of
zeroes in it \- e.g., the loop\-back address \- use:
.IP
-lsof -i@[::1]
+lsof \-i@[::1]
.PP
To obtain a repeat mode marker line that contains the current time, use:
.IP
-lsof -rm====%T====
+lsof \-rm====%T====
.PP
To add spaces to the previous marker line, use:
.IP
-lsof -r "m==== %T ===="
+lsof \-r "m==== %T ===="
.SH BUGS
Since
.I lsof