Skip to content

Instantly share code, notes, and snippets.

View tehlers320's full-sized avatar

Timothy Ehlers tehlers320

  • Expedia inc
  • Chicago, IL
View GitHub Profile
@BigOokie
BigOokie / pgrep-regex-example.txt
Last active April 13, 2023 10:58
Use pgrep with regex patterns to identify specific processes and command line flags
Use the following pattern for `pgrep` to identify a running process that contains specific commandline parameters
Note the following pgrep options are needed:
-a, --list-full list PID and full command line
-f, --full use full process name to match
-c, --count count of matching processes
To find a specific process with a specific commandline parameter use the following:
pgrep -a -f "{processname}.*{commandline param}"