Skip to content

Instantly share code, notes, and snippets.

@Soupala
Created July 11, 2014 11:40
Show Gist options
  • Save Soupala/342502237722f385b4b6 to your computer and use it in GitHub Desktop.
Save Soupala/342502237722f385b4b6 to your computer and use it in GitHub Desktop.
# ps -ef - disaply all processes
# grep apache2 - find the rows with apache
# grep -v grep - remove rows with the word grep
# awk '{print $2}' - get the second column of the previous output
# kill -9 $(..) - execute kill -9 on all the values returned from the previous pipes
kill -9 $(ps -ef |grep apache2 |grep -v grep| awk '{print $2}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment