Recursive text search with grep and file patterns
- by Anders Sandvig
Given this example folder structure:
/folder1/file1.txt
/folder1/file2.djd
/folder2/file3.txt
/folder2/file2.fha
How do I do a recursive text search on all *.txt files with grep from "/"?
("grep -r <pattern> *.txt" fails when run from "/", since there are no .txt files in that folder.)