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       -w     Show  also processes that do not have visible command line (e.g.
28              kernel worker threads).
29
30       -o omitpid
31              Tells pidof to omit processes with that process id. The  special
32              pid  %PPID  can  be used to name the parent process of the pidof
33              program, in other words the calling shell or shell script.
34
35       -S separator
36              Use separator as a separator put between pids.  Used  only  when
37              more  than  one pids are printed for the program.  The -d option
38              is an alias for this option for sysvinit pidof compatibility.
39

EXIT STATUS

41       0      At least one program was found with the requested name.
42
43       1      No program was found with the requested name.
44
45

BUGS

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

SEE ALSO

53       pgrep(1), pkill(1)
54

AUTHOR

56       Jaromir Capik <jcapik@redhat.com>
57
58
59
60                                  2019-09-21                          PIDOF(1)
Impressum