by justinsaccount · 6y ago · 0 comments
pgrep foo -> finds things running matching foo
pkill foo -> kills things running matching foo
except every year or so, I do something like this $ pkill foo
$ echo nothing happened?
$ pkill -9 foo
$ echo nothing happened still? huh?
$ echo ok, let's run this in verbose mode..
$ pkill -9 foo -v
but.. -v isn't verbose. since pkill is part of pgrep, and pgrep is like grep, -v is 'Reverse'.> In pkill's context the short option is disabled to avoid accidental usage of the option.
So at least in the version that I have installed (procps-ng 3.3.15), pkill -v results in an error message, not the catastrophic situation suggested by the parent comment.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=558044
commit 1af18c260a87dc38f0e33bfeb6de6163f91be4ad
Author: Sami Kerola <kerolasa@iki.fi>
Date: Sat Feb 11 20:33:17 2012 +0100
pkill: remove -v match inversion option
The option -v does not make much sense in pkill context.