mac没有netstat -netulp命令 错误使用lsof
这是因为Mac重写了Unix的文件描述符,导致netstat命令无法像linux一样完全一致,但是这些信息其实并没有消失,所以使用lsof可以得到想要的信息~ % netstat -netulpnetstat: illegal option -- eUsage: netstat [-AaLlnW] [-f address_family | -p protocol] netstat [-gilns] [-f address_family] netstat -i | -I interface [-w wait] [-abdgRtS] netstat -s [-s] [-f address_family | -p protocol] [-w wait] netstat -i | -I interface -s [-f address_family | -p protocol] netstat -m [-m] netstat -r [-Aaln] [-f address_family] netstat -rs [-s]
改用lsof命令,例:lsof -i -P | grep -i "listen"
页:
[1]