Skip to content

Instantly share code, notes, and snippets.

@jforge
Last active April 10, 2017 13:18
Show Gist options
  • Select an option

  • Save jforge/ef2bacfd51df594ba8ecfe1ca4c438b4 to your computer and use it in GitHub Desktop.

Select an option

Save jforge/ef2bacfd51df594ba8ecfe1ca4c438b4 to your computer and use it in GitHub Desktop.
PORT=1099; PID=`lsof -i tcp:$PORT | tail -1 | tr -s ' ' | cut -d\ -f2`; echo "Process-ID for Port $PORT is: $PID"; ps aux | grep $PID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment