Skip to content

Instantly share code, notes, and snippets.

@defunkt
Created July 22, 2010 19:20
Show Gist options
  • Select an option

  • Save defunkt/486445 to your computer and use it in GitHub Desktop.

Select an option

Save defunkt/486445 to your computer and use it in GitHub Desktop.
murder processes matching a pattern
# sh function to murder all running processes matching a pattern
# thanks 3n: http://twitter.com/3n/status/19113206105
murder () {
ps | grep $1 | grep -v grep | awk '{print $1}' | xargs kill -9
}
@defunkt
Copy link
Copy Markdown
Author

defunkt commented Jul 22, 2010

Don't ever sudo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment