Would you like to learn how to use the FINDSTR command on a computer running Windows? In this tutorial, we are going to show you multiple ways to use the FINDSTR command, which is the Windows equivalent of the GREP command from Linux.
• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10
Windows – Related Tutorial:
On this page, we offer quick access to a list of tutorials related to Windows.
Tutorial Findstr – Filter the command output
Start a new command-line prompt.
List the status of all services installed on Windows
Here is the command output:
Use the FINDSTR command to filter only the lines containing the word RUNNING.
Keep in mind that the FINDSTR command is case sensitive.
Here is the command output:
This command specifies that the search is not to be case-sensitive.
Use the FINDSTR command to filter multiple strings.
Here is the command output:
In our example, we used the FINDSTR filter to show only lines containing the words: AMAZON and BITS.
Tutorial Findstr – Filter the file content
Start a new command-line prompt.
Create a text file named TEST.
This text file contains the list of software installed on the computer.
Use the FINDSTR command to list all lines containing the word PYTHON.
Here is the command output:
Use the FINDSTR command to list all lines not containing the word PYTHON.
Here is the command output:
In our example, we used the FINDSTR filter to show only selected lines from a text file.