Skip to content

Instantly share code, notes, and snippets.

@svassr
Last active November 29, 2017 14:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svassr/7b5c770ae4c22906416456ca82b48552 to your computer and use it in GitHub Desktop.
Save svassr/7b5c770ae4c22906416456ca82b48552 to your computer and use it in GitHub Desktop.
Handy bash command
# find and kill a specfic process
kill $(ps aux | grep '[p]ython csp_build.py' | awk '{print $2}')
# find and kill process running on a specific port
# aleternativeley you could consider using "sudo netstat -nlp | grep :80"
kill $(sudo lsof -i :80 | grep LISTEN | awk '{print $2}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment