鍍金池/ 問答/iOS  Linux  網(wǎng)絡(luò)安全/ Mac netstat -p提示不存在

Mac netstat -p提示不存在

問題描述

看到有人的mac 使用

netstat -anp | grep 9501

可以查看端口占用等參數(shù)

而我的mac使用這個(gè)指令報(bào) -p不存在

netstat: option requires an argument -- p

有大神知道是怎么個(gè)情況么,是版本問題還是

回答
編輯回答
久礙你

mac下用lsof

lsof -nPi | grep 9501
lsof -nP -iTCP -sTCP:LISTEN | grep 9501
2017年7月8日 11:20
編輯回答
野橘
lsof -i tcp:9501
2017年1月14日 01:53