From 5133b73a6aa07ffe357872c336d5d2c7ec090efe Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Sun, 16 Sep 2018 20:32:14 +0100 Subject: [PATCH] findstr: add page (#2336) --- pages/windows/findstr.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 pages/windows/findstr.md diff --git a/pages/windows/findstr.md b/pages/windows/findstr.md new file mode 100644 index 0000000000..76d08e1314 --- /dev/null +++ b/pages/windows/findstr.md @@ -0,0 +1,35 @@ +# findstr + +> Find specified text within one or more files. + +- Find space-separated string(s) in all files: + +`findstr "{{query}}" *` + +- Find space-separated string(s) in all files recur[s]ively: + +`findstr /s "{{query}}" *` + +- Find strings using a case-insensitive search: + +`findstr /i "{{query}}" *"` + +- Find strings in all files using regular expressions: + +`findstr /r "{{expression}}" *` + +- Find a literal string (containing spaces) in all text files: + +`findstr /c:"{{query}}" *.txt` + +- Find only lines that match the query e[x]actly: + +`findstr /x "{{query}}" *` + +- Display the line number before each matching line: + +`findstr /n "{{query}}" *` + +- Display only the filenames that contain a match: + +`findstr /m "{{query}}" *`