How To Search A Page For Text Mac

  1. How To Search A Page For A Word
  2. How To Search A Webpage For Keywords
  3. How To Search A Page On Facebook
Active2 months ago

Using Summarize on the Mac to Review Text Now that Summarize is enabled, you can use it with any selected text, whether it’s a web page, a long word, text, or pages document, or just about anything else.

  1. The later releases of Firefox have a lot of really handy, but somewhat hidden, features. One such feature allows you to search for a string of text on a web page, simply by typing.
  2. Convert Rich Text to Plain Text in TextEdit. TextEdit opens a new document in rich text mode by default, but you can easily convert a document to plain text at any time.

Is there a way to search through all the text files in a folder (and subfolders) for a specific string or bit of text in Mac OS X?

Chealion
22.6k7 gold badges61 silver badges71 bronze badges
Paul SheldrakePaul Sheldrake
1,81910 gold badges28 silver badges30 bronze badges

8 Answers

You can't do this from the spotlight icon in the menu bar. But you can do it with spotlight:

  1. Navigate to the folder in the finder.

  2. Type your search in the search bar on the top right of the folder.

  3. There is a line above the results that says:

Search: This Mac 'Your Folder Name'

Click on the name of your folder to restrict the search to the folder instead of the whole computer, which is what the default selection 'This Mac' does.

For

Then click the gear icon, choose show search criteria, and change the kind to text files.

ridogiridogi
2,6571 gold badge13 silver badges24 bronze badges

If you prefer the command line,

You'll need to be (or get) familiar with grep. Read man grep for more info.

slhck
171k49 gold badges476 silver badges492 bronze badges
retracileretracile
2,3461 gold badge18 silver badges22 bronze badges

Very powerful and fast

Description:Mac Dev Centre - The Power of mdfind

Run5k
12.5k7 gold badges36 silver badges56 bronze badges
user195192user195192

In the upper right hand corner of your screen: Spotlight

BBEdit supports great search, too, in files and folders.

Daniel Beck
95.4k12 gold badges241 silver badges292 bronze badges
markratledgemarkratledge

c ignores case. See this answer for an overview of the query format and other attributes.

-F searches for fixed strings instead of regex. -l only prints the names of the matching files.

Community
LriLri
32.6k5 gold badges95 silver badges135 bronze badges

Open Finder

Navigate to the folder you want to search if you have one.

Enter the term you want to search in the search bar in the upper right hand corner. You may need to stretch out the window to see it.

After you start typing or press enter you'll see a section below the search box to the left that says,

Search: This Mac 'Your Folder' Shared

If you want to search your whole computer click on 'This Mac'. Otherwise click on the folder name next to it. It may already be selected.

To the right side of those options is a 'Save' button with a plus sign next to it.

Click the plus sign. You'll see two drop down lists. In the first one select 'Kind'. In the second choose 'Any' or 'Text .

Choosing 'Any' may find more matches, while 'Text' will find files Mac OS X determines fall under the category 'Text'.

The number of search results will appear at the footer if the footer is shown.

FYI I've noticed that sometimes it takes time to do a search and sometimes there is no indication Finder is doing anything. I wouldn't wait too long but if you're searching a small folder it should be very quick. If searching your Mac it may take up to a minute or more.

Nota bene: To find an exact phrase enclose it in quotes.

1.21 gigawatts1.21 gigawatts
9575 gold badges23 silver badges48 bronze badges

I'd suggest you look at File Content Finder on the App Store (disclaimer - I'm its developer). It's an affordable app specifically designed for searching file contents without indexing. It supports text files and other major file formats (pdf, doc(x), xls(x), etc).

Its filtering lets you optimise and refine your search by multiple criteria - file type, creation/modification dates, etc.

Here is a detailed documentation on how it works.

Geo SystemsGeo Systems

For the faster search speed, you can use ag (the silver searcher)

Installation: brew install the_silver_searcher

Usage is alike, just replace the grep to ag

For example,

How To Search A Page For A Word

ag 'my string of text' -R .

More information can view on Github.

How To Search A Webpage For Keywords

AsoulAsoul

protected by CommunityJul 2 at 6:27

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?

How To Search A Page On Facebook

Not the answer you're looking for? Browse other questions tagged macosmacsearch or ask your own question.