findstr
Windows CMD · Text · available in the simulator
What it does
Searches for patterns and regular expressions in files.
Syntax
findstr [opciones] cadenas [archivo...]
Options and parameters
/BMatches the pattern if at the beginning of a line.
/EMatches the pattern if at the end of a line.
/LUses search strings literally.
/RUses search strings as regular expressions.
findstr /r "error.*timeout" *.log/SSearches for matching files in the current directory and all subdirectories.
findstr /s /i "error" *.log/IIgnores the case of characters when searching.
/XPrints lines that match exactly.
/VPrints only lines that do not contain a match.
/NPrints the line number before each line that matches.
/MPrints only the filename if a file contains a match.
/OPrints character offset before each matching line.
/PSkips files with non-printable characters.
/FReads file list from the specified file.
/CUses specified text as a literal search string.
findstr /c:"error grave" log.txt/GGets search strings from the specified file.
/DSearches the specified list of directories.
Usage examples
findstr /i "error" *.logfindstr /s /n /i /r "error.*timeout" *.logfindstr /r "error.*timeout" *.logfindstr /s /i "error" *.logfindstr /c:"error grave" log.txt