In windows, the grep command like in linux -- findstr

Source: Internet
Author: User


In windows, similar to the grep command in linux -- findstr often uses the grep command in linux, such as netstat-an | grep 1521. In fact, there is a similar command findstr in windows, such: c: \ Windows \ system32> netstat-an | findstr 1521 TCP 0.0.0.0: 1521 0.0.0.0: 0 LISTENINGTCP 192.168.1.100: 1521 192.168.1.100: 49686 ESTABLISHEDTCP 192.168.1.100: 1521 192.168.1.100: 49701 192.168.1.100: 1521 192.168.1.100: 49702 ESTABLISHEDTCP 192.168.1.100: 1521 192.168.1.100: 49706 ESTABLISHE DTCP 192.168.1.100: 1521 192.168.1.100: 49707 255.tcp 192.168.1.100: 1521 192.168.1.100: 49753 ESTABLISHEDTCP 192.168.1.100: 49686 192.168.1.100: 1521 ESTABLISHEDTCP 192.168.1.100: 49701 192.168.1.100: 1521 255.192.168.1.100: 49702 192.168.1.100: 1521 255.192.168.1.100: 49706 192.168.1.100: 1521 ESTABLISHEDTCP 192.168.1.100: 49707 192.168.1.100: 1521 ESTABLISHEDTCP 192.168.1.100: 49 753 192.168.1.100: 1521 ESTABLISHEDTCP [:]: 1521 [:]: 0 LISTENING www.2cto.com, of course, there is a find command in windows, such as: C: \ Windows \ system32> netstat-an | find "1521" TCP 0.0.0.0: 1521 0.0.0.0: 0 LISTENINGTCP 192.168.1.100: 1521 192.168.1.100: 49686 ESTABLISHEDTCP 192.168.1.100: 1521 192.168.1.100: 49701 ESTABLISHEDTCP 192.168.1.100: 1521 192.168.1.100: 49702 ESTABLISHEDTCP 192.168.1.100: 1521 192.168.1.100: 49706 ESTABLISHEDTCP 192.168.1.100: 1521 192.168.1.100: 49707 protocol TCP 192.168.1.100: 1521 192.168.1.100: 49753 ESTABLISHEDTCP 192.168.1.100: 49686 192.168.1.100: 1521 protocol 192.168.1.100: 49701 192.168.1.100: 1521 protocol 192.168.1.100: 49702 protocol 192.168.1.100: 1521 protocol 192.168.1.100: 49706 192.168.1.100: 1521 ESTABLISHEDTCP 192.168.1.100: 49707 192.168.1.100: 1521 ESTABLISHEDTCP 192.168.1.100: 49753 192.168.1.100: 1521 established tcp [:]: 1521 [:]: 0 LISTENING the difference between the two commands is that find needs to be enclosed by quotation marks. Author Guo Ruisheng

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.