pgrep
/ pkill
recebe um sinal -f
. Na página man
:
-f The pattern is normally only matched against the process name.
When -f is set, the full command line is used.
Por exemplo:
$ sleep 30& sleep 60&
[1] 8007
[2] 8008
$ pkill -f 'sleep 30'
[1] - terminated sleep 30
$ pgrep sleep
8008