In Windows, if I wanted to find a string across all files in all subdirectories, I would do something like
findstr /C:"the string" /S *.h
However, in Linux (say, Ubuntu) I have found no other way than some piped command involving find
, xargs
, and grep
(an example is at this page: How can I recursively grep through sub-directories?). However, my question is different: is there any single, built-in command that works through this magic, without having to write my shell script?