Search for all Processes and kill them all

From Wiki

Revision as of 09:04, 16 July 2010 by Admin (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

So I had a lot of apache processes running and I wanted to kill them all.

pkill -9 www-data
#didn't work
kill -9 id
#did work

Script:

for process in  `ps -eaf | grep www-data | awk '{print $2}'`; do kill -9 $process; done
#worked a charm
Personal tools