This is easily accomplished via the grep command.
grep “find text” /home/greg/*.txt
The same search but will go recursively down the structure.
grep -r “find text” /home/greg/*.txt
The following is recursion and it will also print the file name that the text was found in.
grep -H -r “find text” /home/greg/*.txt
Leave a Reply