1PIDOF(1)                         User Commands                        PIDOF(1)
2
3
4

NAME

6       pidof -- find the process ID of a running program
7

SYNOPSIS

9       pidof  [-s] [-c] [-q] [-w] [-x] [-o omitpid[,omitpid...]...]  [-S sepa‐
10       rator] program [program...]
11

DESCRIPTION

13       Pidof finds the process id's (pids) of the named  programs.  It  prints
14       those id's on the standard output.
15

OPTIONS

17       -s     Single shot - this instructs the program to only return one pid.
18
19       -c     Only  return process ids that are running with the same root di‐
20              rectory.  This option is ignored for  non-root  users,  as  they
21              will  be unable to check the current root directory of processes
22              they do not own.
23
24       -q     Quiet mode, suppress any output and only sets  the  exit  status
25              accordingly.
26
27       -w     Show  also processes that do not have visible command line (e.g.
28              kernel worker threads).
29
30       -x     Scripts too - this causes the program  to  also  return  process
31              id's of shells running the named scripts.
32
33       -o omitpid
34              Tells  pidof to omit processes with that process id. The special
35              pid %PPID can be used to name the parent process  of  the  pidof
36              program, in other words the calling shell or shell script.
37
38       -S separator
39              Use  separator  as  a separator put between pids. Used only when
40              more than one pids are printed for the program.  The  -d  option
41              is an alias for this option for sysvinit pidof compatibility.
42

EXIT STATUS

44       0      At least one program was found with the requested name.
45
46       1      No program was found with the requested name.
47
48

BUGS

50       When  using the -x option, pidof only has a simple method for detecting
51       scripts and will miss scripts that, for example, use env. This  limita‐
52       tion is due to how the scripts look in the proc filesystem.
53
54

SEE ALSO

56       pgrep(1), pkill(1)
57

AUTHOR

59       Jaromir Capik <jcapik@redhat.com>
60
61
62
63                                  2020-12-22                          PIDOF(1)
Impressum