1.检查所有监听端口
#netstat -tln | awk 'NR>2{sub(".*:","",$4);print $4}'
2.检查所有监听端口并排序去重
#netstat -tln | awk 'NR>2{sub(".*:","",$4);print $4}' | sort | uniq
2022-03-03 17:05:16
1.检查所有监听端口
#netstat -tln | awk 'NR>2{sub(".*:","",$4);print $4}'
2.检查所有监听端口并排序去重
#netstat -tln | awk 'NR>2{sub(".*:","",$4);print $4}' | sort | uniq