1 '\" -*- coding: UTF-8 -*-
2 .\" Copyright (C) 1998 Miquel van Smoorenburg.
4 .\" This program is free software; you can redistribute it and/or modify
5 .\" it under the terms of the GNU General Public License as published by
6 .\" the Free Software Foundation; either version 2 of the License, or
7 .\" (at your option) any later version.
9 .\" This program is distributed in the hope that it will be useful,
10 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 .\" GNU General Public License for more details.
14 .\" You should have received a copy of the GNU General Public License
15 .\" along with this program; if not, write to the Free Software
16 .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 .TH PIDOF 1 "2019-09-21" "" "User Commands"
20 pidof -- find the process ID of a running program.
27 .IR omitpid[,omitpid..] ]
29 .IR omitpid[,omitpid..].. ]
36 finds the process id's (pids) of the named programs. It prints those
37 id's on the standard output.
40 Single shot - this instructs the program to only return one \fIpid\fP.
42 Only return process ids that are running with the same root directory.
43 This option is ignored for non-root users, as they will be unable to check
44 the current root directory of processes they do not own.
46 Scripts too - this causes the program to also return process id's of
47 shells running the named scripts.
48 .IP "-o \fIomitpid\fP"
49 Tells \fIpidof\fP to omit processes with that process id. The special
50 pid \fB%PPID\fP can be used to name the parent process of the \fIpidof\fP
51 program, in other words the calling shell or shell script.
52 .IP "-S \fIseparator\fP"
53 Use \fIseparator\fP as a separator put between pids. Used only when
54 more than one pids are printed for the program.
55 The \fI\-d\fR option is an alias for this option for sysvinit pidof
60 At least one program was found with the requested name.
63 No program was found with the requested name.
66 When using the \fI\-x\fP option,
68 only has a simple method for detecting scripts and will miss scripts that,
69 for example, use env. This limitation is due to how the scripts look in
76 Jaromir Capik <jcapik@redhat.com>