Skip to content

Instantly share code, notes, and snippets.

@xiangjian
Created March 5, 2014 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xiangjian/9364368 to your computer and use it in GitHub Desktop.
Save xiangjian/9364368 to your computer and use it in GitHub Desktop.
port判断
TCP端口
nc -w 1 127.0.0.1 53 && echo true || echo false
UDP端口:
nc -w 1 -u 127.0.0.1 53 && echo true || echo false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment