It has been some time since I don't use linux, using windows instead. In windows whenever I want to search for a string on files and files inside subfolders I do (for example for cs files)
findstr /s /i /n "Thepattern" *.cs
lately, I found out that you can use grep in MINGW64 that is installed when using Git. So I tried
grep --color -n -r "Thepattern" *.cs
But even though I put -r
the search does not include the subdirectories.
What am I doing wrong with grep? and how it should be?
EDIT: Anaksunaman provided me with the correct answer:
grep --color -n -r --include=*.cs "Thepattern"
and several other options :) Thanks!
*.cs
.