1 .\" Copyright (c) 2005-2011 Stanislav Sedov <stas@FreeBSD.org>
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd list IDs of all processes that have one or more files open
43 utility writes to stdout the PIDs of processes that have one or
44 more named files open.
45 For block and character special devices, all processes using files
46 on that device are listed.
47 A file is considered open by a process if it was explicitly opened,
48 is the working directory, root directory, jail root directory,
49 active executable text, kernel trace file or the controlling terminal
53 option is specified, the
55 utility will also look through mmapped files.
57 The following options are available:
58 .Bl -tag -width indent
60 Treat files as mount point and report on any files open in the file system.
62 The report must be only for named files.
64 Send signal to reported processes
65 .Pq SIGKILL by default .
67 Search through mmapped files too.
69 Write the user name associated with each process to stderr.
71 Extract values associated with the name list from the specified core
72 instead of the default
75 Extract the name list from the specified system instead of the default,
76 which is the kernel image the system has booted from.
78 Use given signal name instead of default SIGKILL.
81 The following symbols, written to stderr will indicate how files is used:
84 The file is the root directory of the process.
86 The file is the current workdir directory of the process.
88 The file is the jail-root of the process.
90 The file is the kernel tracing file for the process.
92 The file is executable text of the process.
94 The process use this file as its controlling tty.
98 The file is open for writing.
100 The file is open as append only
101 .Pq O_APPEND was specified .
103 The process bypasses fs cache while writing to this file
104 .Pq O_DIRECT was specified .
108 Exclusive lock is hold.
113 utility returns 0 on successful completion and >0 otherwise.
117 writes to standard output the process IDs of processes that are using the
118 current directory and writes to stderr an indication of how those processes are
119 using the directory and user names associated with the processes that are using
131 utility is expected to conform to
141 utility and this manual page was written by
142 .An Stanislav Sedov Aq Mt stas@FreeBSD.org .
146 takes a snapshot of the system, it is only correct for a very short period
150 interface the report will be limited to filesystems the
152 utility knows about (currently only cd9660, devfs, nfs, ntfs, nwfs, udf,