[clue-tech] Too many words from ``

Roger Frank rfrank at linuxclassroom.org
Tue Jul 18 17:14:11 MDT 2000


On Tue, 18 Jul 2000, you wrote:
> I occasionally need to search for every occurrence of a string in many (if
> not all) the files in a directory tree.  I can usually just do a
> 
> grep -ns string `find /path/to/tree -name "*" -print` | more

When I need to do that, for example to find all files that have
the string #include <iostream.h>, I cd to the top of the directory
tree and use
	grep -nr "#include <iostream.h>" * 
where the n gives the line number and the r says descend into
the subdirectories and * means check every file.

-- 
Roger Frank
rfrank at linuxclassroom.org



More information about the clue-tech mailing list