-
-
Save mig82/32782e3dd36357eca79c3fded6e11be8 to your computer and use it in GitHub Desktop.
put this in your $shellrc and enjoy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find ALL the port users. _o/ | |
findbyport() { | |
lsof -nP | grep ":$@" | awk '{print "Program: " $1 "\n" "PID: "$2 "\n" "User: " $3 "\n" "Address: "$9 "\n" "Action: " $10}' | |
} | |
portsinuse() { | |
lsof -nP | grep "IPv" | while read line; do echo $line | awk '{print "Program: " $1 "\n" "PID: "$2 "\n" "User: " $3 "\n" "Address: "$9 "\n" "Action: " $10}'; echo; done; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment