Skip to content

Instantly share code, notes, and snippets.

@donvitonet
Last active August 29, 2015 14:11
Show Gist options
  • Save donvitonet/53c34b3bb3b801e6f18c to your computer and use it in GitHub Desktop.
Save donvitonet/53c34b3bb3b801e6f18c 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