- How To Find Good Keywords
- Search For Keywords In Text
- How To Search Page For Keywords
- How To Search All Text On Mac For A Keywords
![All All](https://www.hackcollege.com/wp-content/uploads/2011/12/Basics-Tab.png)
Active2 years, 3 months ago
The iOS text message search feature needs to be fixed. I can type part of a previously sent message in the iMessage app's search bar and see the actual message as an option to tap on.
I'd like to find all files that contain a certain string of text. How would you do that in the Terminal?
Ignacio's Answer is great and helped me find the files containing certain text. The only issue I was facing was that when running this command all the files would be listed, including one where the pattern did not show up. Supposing you need to search for files containing text - 'async', recursively in current directory, you can do so in one of the ways like below: Using grep Using ack. I can't seem to find a way to do a keyword search on outlook express on a mac. If I type in a word in search or advanced search OE seems to look for thing with that word in it eg. If i search for emails with the word art in the title i will get back all subjects with the word art anywhere in a word like artwork or artful or artistic and even start. You'll be taken to your Messages app, where “chickens” showed me all the old messages I had from friends as well as any other text message wherein “chickens” appeared. Click on the specific message you were looking for, and you'll be brought to the message at the place of your search term. 'find is the standard tool for searching files containing specific text on Unix-like platforms' seems rather ambiguous to me. Even besides recursive grep find doesn't directly search the inside of files for text.
Chealion22.6k77 gold badges6161 silver badges7171 bronze badges
SvishSvish17.9k5555 gold badges112112 silver badges170170 bronze badges
5 Answers
Ignacio Vazquez-AbramsIgnacio Vazquez-Abrams98.7k77 gold badges162162 silver badges217217 bronze badges
user46046user46046
- Through Ack
brew install ack ack 'text goes here'
- Through find
find . |grep 'text goes here'
- Through grep
How To Find Good Keywords
grep -RnslI 'text goes here'
Anant GuptaAnant Gupta
You can choose one of the below depending on your taste and needs. Supposing you need to search for files containing text - 'async', recursively in current directory, you can do so in one of the ways like below:
Using grep
Search For Keywords In Text
Using ack
karthikskarthiks
Ignacio's Answer is great and helped me find the files containing certain text. The only issue I was facing was that when running this command all the files would be listed, including one where the pattern did not show up.
No such file or directory
This is what I see alongside files that do not contain the pattern.How To Search Page For Keywords
If instead you add
-s
to the command, as in:grep -lr 'text pattern' ./ -s
; grep -lr 'text pattern' [PATH DIRECTORY] -s
is used, it will only show you which files contain the pattern.Similarly if
grep -nr 'text pattern' ./ -s
; grep -nr 'text pattern' [PATH OF DIRECTORY] -s
command is used it prints the file plus the line number, and occurrence of the pattern.How To Search All Text On Mac For A Keywords
Please correct me if my understanding is wrong.
CP3OCP3O
Not the answer you're looking for? Browse other questions tagged macosmacunixterminalsearch or ask your own question.
--I don't think that's doable with automator. extracting a particular line from a pdf document is not a trivial task. unless there is automator or applescript support for this function for some particular apps like acrobat, maybe, this isn't going to be possible.--
wait, strike all that. there is an action to extract text from particular pdf files. this will extract all text not just some line but you can then search the extracted text for particular text string that you want.
Message was edited by: V.K.
wait, strike all that. there is an action to extract text from particular pdf files. this will extract all text not just some line but you can then search the extracted text for particular text string that you want.
Message was edited by: V.K.
Feb 13, 2010 11:55 AM