Skip to content

Instantly share code, notes, and snippets.

@cterrykenzan
Created October 13, 2016 20:25
Show Gist options
  • Save cterrykenzan/e78e33a34e5ca1762f9920e17c7d46f6 to your computer and use it in GitHub Desktop.
Save cterrykenzan/e78e33a34e5ca1762f9920e17c7d46f6 to your computer and use it in GitHub Desktop.
One-liners
# Get a clean list of processes with listeners. Provides process name, pid, address, and port
sudo lsof -P | grep LISTEN | tr -s " " | cut -d " " -f 1,2,9- | sed -e s/TCP\ //g | sort -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment