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]  [-x]  [-o  omitpid[,omitpid..]]   [-o omitpid[,omit‐
10       pid..]..]  [-S separator] 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
20              directory.  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       -x     Scripts too - this causes the program  to  also  return  process
25              id's of shells running the named scripts.
26
27       -o omitpid
28              Tells  pidof to omit processes with that process id. The special
29              pid %PPID can be used to name the parent process  of  the  pidof
30              program, in other words the calling shell or shell script.
31
32       -S separator
33              Use  separator  as  a separator put between pids. Used only when
34              more than one pids are printed for the program.
35

EXIT STATUS

37       0      At least one program was found with the requested name.
38
39       1      No program was found with the requested name.
40
41

BUGS

43       When using the -x option, pidof only has a simple method for  detecting
44       scripts  and will miss scripts that, for example, use env. This limita‐
45       tion is due to how the scripts look in the proc filesystem.
46
47

SEE ALSO

49       pgrep(1), pkill(1)
50

AUTHOR

52       Jaromir Capik <jcapik@redhat.com>
53
54
55
56                                  2018-03-03                          PIDOF(1)
Impressum