netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}' 理解一下 好吧 转载于:https://www.cnblogs.com/vvnic/p/8610456.html