Is there a way (perhaps a script) how to automate this process:
petr@sova:~$ ps -ef | grep middleman
petr 18445 2312 1 12:06 pts/2 00:00:01 /home/petr/.rvm/gems/ruby-1.9.3-p362/bin/middleman
petr 18581 13621 0 12:08 pts/0 00:00:00 grep --color=auto middleman
petr@sova:~$ kill -9 18445
Unfortunately, pkill
is too weak as I have to go with -9
option on kill
.
-9
withpkill
too...-KILL
than-9
. What number corresponds to what signal is implementation-dependent.SIGKILL
happens to be9
on Linux i386 and Linux amd64, but not necessarily everywhere. (More info here.)-KILL
too (because it makes code more readable), it should be noted thatSIGKILL = 9
is specified by POSIX, so-9
is pretty portable nowadays (and does not depend on kernels or architectures).