Last active
February 21, 2021 18:21
-
-
Save book000/4392fc6d39ed7035c08ccac48d1860bd to your computer and use it in GitHub Desktop.
使用しているポート一覧を表示するワンライナーコード
This file contains hidden or 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
sudo lsof -iTCP -sTCP:LISTEN -P | sed 's/NAME//g' | awk '{ print $9 }' | sed 's/localhost/*/g' | sed 's/*://g' | sort --numeric-sort | uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment