I'm using bash under Ubuntu.
Currently this works well for the current directory:
catdoc *.doc | grep "specificword"
But I have lots of subdirectories with .doc files.
How can I search for, let's say, "specificword" recursively?
This will also output the file name:
(Normally I would use
You might want to look at recoll which is a full-text search tool for Linux and Unix systems supporting many different document formats. However, it is index-based, i.e., it has to index the documents you want to search in before the actual search. (Thanks to pabouk for pointing this out).
There is a GUI and a command line, too.
See the documentation for further infos.
Grep should find binary matches with: