This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}" |