Skip to content

Instantly share code, notes, and snippets.

@malyw malyw/

Last active Aug 5, 2016
What would you like to do?
Script to kill all the processes which established connection to the port.Usage: './ 35729' (clear the livereload port)
#!/usr/bin/env bash
function terminate {
echo ':'$1
lsof -P | grep ':'$1 | awk '{print $2}' | xargs kill -9
terminate $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.