Section: User Commands (1)
Updated: October 2012
pgrep [options] pattern
pgrep looks through the currently running processes and lists the process IDs which match the selection criteria to stdout. All the criteria have to match. For example,
will only list the processes called sshd AND owned by root. On the other hand,
will list the processes owned by root OR daemon.
Example 1: Find the process ID of the named daemon:
Example 2: Make syslog reread its configuration file:
Example 3: Give detailed information on all xterm processes:
Example 4: Make all netscape processes run nicer:
The process name used for matching is limited to the 15 characters present in the output of /proc/pid/stat. Use the -f option to match against the complete command line, /proc/pid/cmdline.
The options -n and -o and -v can not be combined. Let me know if you need to do this.
Defunct processes are reported.
Please send bug reports to
Tutoriais de Tecnologia Web