Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

-mattias-

macrumors regular
Original poster
Dec 11, 2009
107
0
I'm looking for a document on my Mac, but I don't know where it is and I cannot remeber the name or anything, only some of the text inside.

So I'm looking for a program, that can search for a phrase or something of text inside documents through all my documents on my harddisk.
 
Are you saying that the Mac's built-in Spotlight feature doesn't find the doc?

You could open a terminal and use a combination of find and grep to get potential matches.

$ find ~ -type f -exec grep -i 'your exact phrase' /dev/null {} \;

The /dev/null part is just a trick to get the filenames to always print, even though each grep is really against a single file. Or if you used grep -l (ell) then it would show only the filenames with matches and you could leave the /dev/null off.

Sorry, it won't likely find matches in documents stored in compressed or binary form. You might find a few more hits with 'strings' instead of grep, but then it won't be case insensitive like grep -i.
 
I'm looking for a document on my Mac, but I don't know where it is and I cannot remeber the name or anything, only some of the text inside.

So I'm looking for a program, that can search for a phrase or something of text inside documents through all my documents on my harddisk.

Have you tried Spotlight? If not, CMD SPACE then type the word you know is in the doc
 
I'm looking for a document on my Mac, but I don't know where it is and I cannot remeber the name or anything, only some of the text inside.

So I'm looking for a program, that can search for a phrase or something of text inside documents through all my documents on my harddisk.
In Finder, you can search for your search terms in file names or in file contents. No other app is required.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.