金鳞

目标->软件测试架构师

ALL_XL菜鸟 20090531 11:39:13
我想查看当前系统启用了哪些端口

LINUX_一苇可航 20090531  11:39:48
netstat -lnptu

None_无奈人生 20090531  11:39:48
netstat -an | grep -i listen

ALL_XL菜鸟  20090531  11:40:12
root@GZJF_A_DB # netstat -an | grep -i listen
tcp4       0      0  *.13                   *.*                    LISTEN
tcp        0      0  *.21                   *.*                    LISTEN
tcp        0      0  *.23                   *.*                    LISTEN
tcp4       0      0  *.25                   *.*                    LISTEN
tcp4       0      0  *.37                   *.*                    LISTEN
tcp4       0      0  *.111                  *.*                    LISTEN
tcp4       0      0  *.199                  *.*                    LISTEN
tcp        0      0  *.512                  *.*                    LISTEN
tcp        0      0  *.513                  *.*                    LISTEN
tcp        0      0  *.514                  *.*                    LISTEN
tcp4       0      0  *.657                  *.*                    LISTEN
tcp4       0      0  *.1334                 *.*                    LISTEN
tcp4       0      0  *.1521                 *.*                    LISTEN
tcp        0      0  *.2049                 *.*                    LISTEN
tcp4       0      0  *.2700                 *.*                    LISTEN
tcp4       0      0  *.2780                 *.*                    LISTEN
tcp4       0      0  *.6112                 *.*                    LISTEN
tcp4       0      0  *.6174                 *.*                    LISTEN
tcp4       0      0  *.6177                 *.*                    LISTEN
tcp4       0      0  *.6191                 *.*                    LISTEN
tcp4       0      0  *.6389                 *.*                    LISTEN
tcp4       0      0  *.32768                *.*                    LISTEN
tcp4       0      0  *.32769                *.*                    LISTEN
tcp4       0      0  *.32770                *.*                    LISTEN
tcp4       0      0  *.32781                *.*                    LISTEN
tcp4       0      0  *.32782                *.*                    LISTEN
tcp4       0      0  *.32783                *.*                    LISTEN
tcp4       0      0  *.9090                 *.*                    LISTEN
ALL_XL菜鸟  20090531  11:40:38
root@GZJF_A_DB # netstat -lnptu
netstat: Not a recognized flag: l
usage: netstat [-Aaon] [-f address_family]
               [-D]
               [-cCgimMnPrsuvZ] [-f address_family] [-p proto]
               [-n] [-I interface] [interval]


Perl_Shell_复?  20090531   12:51:43
netstat -ntlp | awk  -F : '$2~/80/||$2~/111/||$2~/3306/{print $0}'
c++_cracker007  20090531   12:59:14
netstat -ntlp | awk  -F : '$2~/80|111|3306/{print $0}'
Perl_Shell_复?  20090531  13:00:18
也可以
posted on 2009-05-31 12:37 金鳞 阅读(421) 评论(0)  编辑 收藏 引用 所属分类: *nix
只有注册用户登录后才能发表评论。