Yes—grep is the classic Unix tool for that. Here are a few common ways to use it:
1. Search a single file for “foo”
`grep 'foo' filename.txt`
2. Search all *.txt files in the current directory:
`grep 'foo' *.txt`
3. Case-insensitive search (matches Foo, FOO, etc.):
`grep -i 'foo' *.txt`
4. Show line numbers with each match:
`grep -n 'foo' *.txt`
5. Recursive search through subdirectories for any *.txt files:
`grep -R –include='*.txt' 'foo' ./`
6. If you don’t care about file extension and want every text file under here:
`grep -R 'foo' ./`
A few tips:
• Quote your pattern if it contains spaces or special chars.
• Combine flags, e.g. `grep -Rin 'foo bar' ./` for a recursive, case-insensitive search that prints line numbers.
• For huge trees, you might also try ripgrep (`rg`) for speed—it has very similar syntax.
Does that cover what you need, or would you like an example tailored to your specific folder structure?