grep recursive filename matching (grep -ir “xyz” *.cpp) does not work
Grep will recurse through any directories you match with your glob pattern. (In your case, you probably do not have any directories that match the pattern “*.cpp”) You could explicitly specify them: grep -ir “xyz” *.cpp */*.cpp */*/*.cpp */*/*/*.cpp, etc. You can also use the –include option (see the example below) If you are using … Read more