Archive for the tag 'string'

Kill all processes matching certain strings.

This guide will help you to know how to kill all processes matching certain strings, for our example we will use httpd.

One very simple method is killall, such as

killall -9 httpd

If that doesn’t work you can go through the process list and kill -9 the pids by using the following,

kill -9 $(ps aux | grep -v grep | grep httpd | awk ‘{print $2}’)

Where httpd is the string.