find
Windows CMD · Text · available in the simulator
What it does
Searches for a string in a file or command output.
Syntax
find [/v] [/c] [/n] [/i] "cadena" [archivo...]
Options and parameters
/iignores case
/ccounts matching lines
/ndisplays line numbers
/vlines NOT containing the string
/VDisplays all lines NOT containing the specified string.
/CDisplays only the count of lines containing the string.
find /c "error" log.txt/NDisplays line numbers with the matching lines.
/IIgnores the case of characters when searching.
find /i "error" log.txt/OFFDoes not skip files with the offline attribute set.
Usage examples
find "error" log.txtfind /i "error" log.txtfind /c "error" log.txt
Notes and common mistakes
- The string must be enclosed in quotation marks. For regular expressions, use findstr.