no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


pgrep [2015/10/05 19:54] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== pgrep ======
  
 +Search for process names using grep
 +
 +== Display all processes a user is running ==
 +
 +<code>
 +pgrep -u user -l
 +</code>
 +
 +== Match a pattern ==
 +
 +<code>
 +pgrep -f shell.sh
 +</code>
 +
 +== Display full command ==
 +
 +Requires a field argument.
 +
 +<code>
 +pgrep -f shell.sh -a
 +</code>
 +
 +== Display PID and binary name ==
 +
 +<code>
 +pgrep -l sshd
 +</code>
 +
 +== Display number of processes running matching a name ==
 +
 +Useful for cron jobs:
 +
 +<code>
 +pgrep -u clients -x rdiff-backup -c
 +</code>

Navigation
QR Code
QR Code pgrep (generated for current page)