Created
January 14, 2015 00:52
-
-
Save evanscottgray/75b940e8ec0bc71fc48d 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