Let's say I need to find the function GetTypes()
in all C# source file (.cs
) the directories/subdirectories.
I used grep -rn GetTypes *.cs
, but I got an error with grep: *.cs: No such file or directory
. I had to use grep -rn GetTypes *
, but in this case it shows all the files not *.cs
only.
What command do I need to use to find the string only in .cs
files?