windows下的类似linux下的grep命令--findstr windows下的类似linux下的grep命令——findstr
经常⽤linux下的grep命令,⽐如:
netstat -an|grep 1521
其实windows下也有⼀个类似的命令findstr,⽐如:
C:\Windows\system32>netstat -an|findstr 1521
TCP 0.0.0.0:1521 0.0.0.0:0 LISTENING
TCP 192.168.1.100:1521 192.168.1.100:49686 ESTABLISHED
TCP 192.168.1.100:1521 192.168.1.100:49701 ESTABLISHED
TCP 192.168.1.100:1521 192.168.1.100:49702 ESTABLISHED
TCP 192.168.1.100:1521 192.168.1.100:49706 ESTABLISHED
find查命令的使用TCP 192.168.1.100:1521 192.168.1.100:49707 ESTABLISHED
TCP 192.168.1.100:1521 192.168.1.100:49753 ESTABLISHED
TCP 192.168.1.100:49686 192.168.1.100:1521 ESTABLISHED
TCP 192.168.1.100:49701 192.168.1.100:1521 ESTABLISHED
TCP 192.168.1.100:49702 192.168.1.100:1521 ESTABLISHED
TCP 192.168.1.100:49706 192.168.1.100:1521 ESTABLISHED
TCP 192.168.1.100:49707 192.168.1.100:1521 ESTABLISHED
TCP 192.168.1.100:49753 192.168.1.100:1521 ESTABLISHED
TCP [::]:1521 [::]:0 LISTENING
当然windows下还有⼀个find命令,⽐如:
C:\Windows\system32>netstat -an|find "1521"
TCP 0.0.0.0:1521 0.0.0.0:0 LISTENING
TCP 192.168.1.100:1521 192.168.1.100:49686 ESTABLISHED
TCP 192.168.1.100:1521 192.168.1.100:49701 ESTABLISHED
TCP 192.168.1.100:1521 192.168.1.100:49702 ESTABLISHED
TCP 192.168.1.100:1521 192.168.1.100:49706 ESTABLISHED
TCP 192.168.1.100:1521 192.168.1.100:49707 ESTABLISHED
TCP 192.168.1.100:1521 192.168.1.100:49753 ESTABLISHED
TCP 192.168.1.100:49686 192.168.1.100:1521 ESTABLISHED
TCP 192.168.1.100:49701 192.168.1.100:1521 ESTABLISHED
TCP 192.168.1.100:49702 192.168.1.100:1521 ESTABLISHED
TCP 192.168.1.100:49706 192.168.1.100:1521 ESTABLISHED
TCP 192.168.1.100:49707 192.168.1.100:1521 ESTABLISHED
TCP 192.168.1.100:49753 192.168.1.100:1521 ESTABLISHED
TCP [::]:1521 [::]:0 LISTENING
两个命令的区别是find需要⽤引号引起来。
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论