How to search all documents for a specific phrase in macOS?
up vote
0
down vote
favorite
We've read other questions similar to this and the answers they received but none of the answers proved satisfactory.
We want to search the contents of all documents on our Mac for the two word phrase “ten days.”
We've tried Spotlight and Command+F.
- Spotlight did not produce useful results.
- Using F we specified search of “This Mac,”
kind=any
,contents=ten days
,ignore case
andwhole words only
. This search resulted in documents containing only the word “days” and the word “written,” (among others.)
We are not programmers so we don't write code nor do we know how to use commands which are code. We just want to find the phrase.
macos search
add a comment |
up vote
0
down vote
favorite
We've read other questions similar to this and the answers they received but none of the answers proved satisfactory.
We want to search the contents of all documents on our Mac for the two word phrase “ten days.”
We've tried Spotlight and Command+F.
- Spotlight did not produce useful results.
- Using F we specified search of “This Mac,”
kind=any
,contents=ten days
,ignore case
andwhole words only
. This search resulted in documents containing only the word “days” and the word “written,” (among others.)
We are not programmers so we don't write code nor do we know how to use commands which are code. We just want to find the phrase.
macos search
Spotlight (and Command F search) is dependent on meta data, the availability of which is enabled in System Preferences => Spotlight - Search Results. "Only selected categories will appear in Spotlight search results." I can find a couple dozen hits on my Mac using "ten days" (Spotlight, in quotes).
– user187561
May 28 '15 at 4:39
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
We've read other questions similar to this and the answers they received but none of the answers proved satisfactory.
We want to search the contents of all documents on our Mac for the two word phrase “ten days.”
We've tried Spotlight and Command+F.
- Spotlight did not produce useful results.
- Using F we specified search of “This Mac,”
kind=any
,contents=ten days
,ignore case
andwhole words only
. This search resulted in documents containing only the word “days” and the word “written,” (among others.)
We are not programmers so we don't write code nor do we know how to use commands which are code. We just want to find the phrase.
macos search
We've read other questions similar to this and the answers they received but none of the answers proved satisfactory.
We want to search the contents of all documents on our Mac for the two word phrase “ten days.”
We've tried Spotlight and Command+F.
- Spotlight did not produce useful results.
- Using F we specified search of “This Mac,”
kind=any
,contents=ten days
,ignore case
andwhole words only
. This search resulted in documents containing only the word “days” and the word “written,” (among others.)
We are not programmers so we don't write code nor do we know how to use commands which are code. We just want to find the phrase.
macos search
macos search
edited Jun 13 at 23:19
JakeGould
30.7k1093135
30.7k1093135
asked May 28 '15 at 3:52
Ima Guest
1111
1111
Spotlight (and Command F search) is dependent on meta data, the availability of which is enabled in System Preferences => Spotlight - Search Results. "Only selected categories will appear in Spotlight search results." I can find a couple dozen hits on my Mac using "ten days" (Spotlight, in quotes).
– user187561
May 28 '15 at 4:39
add a comment |
Spotlight (and Command F search) is dependent on meta data, the availability of which is enabled in System Preferences => Spotlight - Search Results. "Only selected categories will appear in Spotlight search results." I can find a couple dozen hits on my Mac using "ten days" (Spotlight, in quotes).
– user187561
May 28 '15 at 4:39
Spotlight (and Command F search) is dependent on meta data, the availability of which is enabled in System Preferences => Spotlight - Search Results. "Only selected categories will appear in Spotlight search results." I can find a couple dozen hits on my Mac using "ten days" (Spotlight, in quotes).
– user187561
May 28 '15 at 4:39
Spotlight (and Command F search) is dependent on meta data, the availability of which is enabled in System Preferences => Spotlight - Search Results. "Only selected categories will appear in Spotlight search results." I can find a couple dozen hits on my Mac using "ten days" (Spotlight, in quotes).
– user187561
May 28 '15 at 4:39
add a comment |
3 Answers
3
active
oldest
votes
up vote
0
down vote
I use EasyFind (freeware) for that type of search.
It does it the old-fashioned way, of actually reading through everything til it finds what you want.
Slower than Spotlight, but more thorough & better for content & System file searches.
add a comment |
up vote
0
down vote
Full disclosure: I am the developer of HoudahSpot.
You can use Spotlight at the command line or by the way of a third party front-end to search for phrases. This works as long as the text of the files you are looking for is indexed by Spotlight. I.e. the drive / folder must be indexed and the Spotlight importer in charge of the file must have extracted text content.
In HoudahSpot (use HoudahSpot 3.9 on Mac OS X 10.9.5) you can express your search as:
"Text Content" "Contains Phrase" "ten days"
HoudahSpot can also show you the query it sends to Spotlight. You can use that query with the mdfind command in Terminal.app. For the above example, the command is:
mdfind 'kMDItemTextContent == "*ten days*"c'
add a comment |
up vote
0
down vote
If you just want to find a file with a name
Just go to the terminal
cd into the following directory (type cd and keep a spance drag and drop the folder and hit return)
and type
find . | grep -irl "filename"
or if want to find a phrase in all documents just type
grep -irl "phrase" .
i - for ignore case
r - recursive
l - list (remove the l to see all the occurances)
. - is the current directory
if you are unaware of the location use sudo find / |grep -irl 'filename|"phrase"' notice there ARE ' ' on both ends of the grep command side of that command they are needed to 'escape' the "phrase"
– linuxdev2013
Sep 29 '16 at 12:25
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I use EasyFind (freeware) for that type of search.
It does it the old-fashioned way, of actually reading through everything til it finds what you want.
Slower than Spotlight, but more thorough & better for content & System file searches.
add a comment |
up vote
0
down vote
I use EasyFind (freeware) for that type of search.
It does it the old-fashioned way, of actually reading through everything til it finds what you want.
Slower than Spotlight, but more thorough & better for content & System file searches.
add a comment |
up vote
0
down vote
up vote
0
down vote
I use EasyFind (freeware) for that type of search.
It does it the old-fashioned way, of actually reading through everything til it finds what you want.
Slower than Spotlight, but more thorough & better for content & System file searches.
I use EasyFind (freeware) for that type of search.
It does it the old-fashioned way, of actually reading through everything til it finds what you want.
Slower than Spotlight, but more thorough & better for content & System file searches.
answered May 28 '15 at 6:24
Tetsujin
15.2k53260
15.2k53260
add a comment |
add a comment |
up vote
0
down vote
Full disclosure: I am the developer of HoudahSpot.
You can use Spotlight at the command line or by the way of a third party front-end to search for phrases. This works as long as the text of the files you are looking for is indexed by Spotlight. I.e. the drive / folder must be indexed and the Spotlight importer in charge of the file must have extracted text content.
In HoudahSpot (use HoudahSpot 3.9 on Mac OS X 10.9.5) you can express your search as:
"Text Content" "Contains Phrase" "ten days"
HoudahSpot can also show you the query it sends to Spotlight. You can use that query with the mdfind command in Terminal.app. For the above example, the command is:
mdfind 'kMDItemTextContent == "*ten days*"c'
add a comment |
up vote
0
down vote
Full disclosure: I am the developer of HoudahSpot.
You can use Spotlight at the command line or by the way of a third party front-end to search for phrases. This works as long as the text of the files you are looking for is indexed by Spotlight. I.e. the drive / folder must be indexed and the Spotlight importer in charge of the file must have extracted text content.
In HoudahSpot (use HoudahSpot 3.9 on Mac OS X 10.9.5) you can express your search as:
"Text Content" "Contains Phrase" "ten days"
HoudahSpot can also show you the query it sends to Spotlight. You can use that query with the mdfind command in Terminal.app. For the above example, the command is:
mdfind 'kMDItemTextContent == "*ten days*"c'
add a comment |
up vote
0
down vote
up vote
0
down vote
Full disclosure: I am the developer of HoudahSpot.
You can use Spotlight at the command line or by the way of a third party front-end to search for phrases. This works as long as the text of the files you are looking for is indexed by Spotlight. I.e. the drive / folder must be indexed and the Spotlight importer in charge of the file must have extracted text content.
In HoudahSpot (use HoudahSpot 3.9 on Mac OS X 10.9.5) you can express your search as:
"Text Content" "Contains Phrase" "ten days"
HoudahSpot can also show you the query it sends to Spotlight. You can use that query with the mdfind command in Terminal.app. For the above example, the command is:
mdfind 'kMDItemTextContent == "*ten days*"c'
Full disclosure: I am the developer of HoudahSpot.
You can use Spotlight at the command line or by the way of a third party front-end to search for phrases. This works as long as the text of the files you are looking for is indexed by Spotlight. I.e. the drive / folder must be indexed and the Spotlight importer in charge of the file must have extracted text content.
In HoudahSpot (use HoudahSpot 3.9 on Mac OS X 10.9.5) you can express your search as:
"Text Content" "Contains Phrase" "ten days"
HoudahSpot can also show you the query it sends to Spotlight. You can use that query with the mdfind command in Terminal.app. For the above example, the command is:
mdfind 'kMDItemTextContent == "*ten days*"c'
answered May 28 '15 at 14:12
Pierre Bernard
20113
20113
add a comment |
add a comment |
up vote
0
down vote
If you just want to find a file with a name
Just go to the terminal
cd into the following directory (type cd and keep a spance drag and drop the folder and hit return)
and type
find . | grep -irl "filename"
or if want to find a phrase in all documents just type
grep -irl "phrase" .
i - for ignore case
r - recursive
l - list (remove the l to see all the occurances)
. - is the current directory
if you are unaware of the location use sudo find / |grep -irl 'filename|"phrase"' notice there ARE ' ' on both ends of the grep command side of that command they are needed to 'escape' the "phrase"
– linuxdev2013
Sep 29 '16 at 12:25
add a comment |
up vote
0
down vote
If you just want to find a file with a name
Just go to the terminal
cd into the following directory (type cd and keep a spance drag and drop the folder and hit return)
and type
find . | grep -irl "filename"
or if want to find a phrase in all documents just type
grep -irl "phrase" .
i - for ignore case
r - recursive
l - list (remove the l to see all the occurances)
. - is the current directory
if you are unaware of the location use sudo find / |grep -irl 'filename|"phrase"' notice there ARE ' ' on both ends of the grep command side of that command they are needed to 'escape' the "phrase"
– linuxdev2013
Sep 29 '16 at 12:25
add a comment |
up vote
0
down vote
up vote
0
down vote
If you just want to find a file with a name
Just go to the terminal
cd into the following directory (type cd and keep a spance drag and drop the folder and hit return)
and type
find . | grep -irl "filename"
or if want to find a phrase in all documents just type
grep -irl "phrase" .
i - for ignore case
r - recursive
l - list (remove the l to see all the occurances)
. - is the current directory
If you just want to find a file with a name
Just go to the terminal
cd into the following directory (type cd and keep a spance drag and drop the folder and hit return)
and type
find . | grep -irl "filename"
or if want to find a phrase in all documents just type
grep -irl "phrase" .
i - for ignore case
r - recursive
l - list (remove the l to see all the occurances)
. - is the current directory
answered Sep 26 '16 at 11:12
TanJay
1
1
if you are unaware of the location use sudo find / |grep -irl 'filename|"phrase"' notice there ARE ' ' on both ends of the grep command side of that command they are needed to 'escape' the "phrase"
– linuxdev2013
Sep 29 '16 at 12:25
add a comment |
if you are unaware of the location use sudo find / |grep -irl 'filename|"phrase"' notice there ARE ' ' on both ends of the grep command side of that command they are needed to 'escape' the "phrase"
– linuxdev2013
Sep 29 '16 at 12:25
if you are unaware of the location use sudo find / |grep -irl 'filename|"phrase"' notice there ARE ' ' on both ends of the grep command side of that command they are needed to 'escape' the "phrase"
– linuxdev2013
Sep 29 '16 at 12:25
if you are unaware of the location use sudo find / |grep -irl 'filename|"phrase"' notice there ARE ' ' on both ends of the grep command side of that command they are needed to 'escape' the "phrase"
– linuxdev2013
Sep 29 '16 at 12:25
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f920509%2fhow-to-search-all-documents-for-a-specific-phrase-in-macos%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Spotlight (and Command F search) is dependent on meta data, the availability of which is enabled in System Preferences => Spotlight - Search Results. "Only selected categories will appear in Spotlight search results." I can find a couple dozen hits on my Mac using "ten days" (Spotlight, in quotes).
– user187561
May 28 '15 at 4:39