Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for a tool that would allow me to do fast searches inside files, something considerably more complex than what finder provides.

Features looking for:

  • file extension filtering (include/exclude)
  • directory selection, eventual defining search groups
  • unicode support
  • replace functionality (optional)
  • save/load presets (optional)

Also, it has to be fast and be able to search in >100.000 files without putting the computer down.

share|improve this question
up vote 2 down vote accepted

Once you get beyond simply searching in files and enter the realm of doing things like find/replace and file extension filtering, you can't get faster or more extensible than Unix tools like sed, awk, and grep (or ack), particularly when working on hundreds of thousands of files, as you specify.

Bash supports file globbing, so you can easily do extension filtering. Pipe the filtered files into sed for search and replace. I'm not sure exactly what kind of presets you're looking for, but if you find yourself doing the same type of thing often you can put together a script with common "presets".

I've tried TextMate and TextWrangler, and both slow down considerably when running on lots of files. I'd highly recommend familiarizing yourself with the above tools, if you haven't already.

share|improve this answer

mdfind is the way to go for anything looking inside a file. You can filter the hits later with perl or grep or whatever alse you wish.

If using spotlight isn't something you can do and really want a tool that reads thousands of files bbfind which is part of BBEdit is the way to go.

share|improve this answer

The Mac OS X Spotlight gives you most of these features:

  1. In the Finder, navigate to a specific directory
  2. Start typing the search term to the search text box at the top right of the Finder
  3. Now you will see a "Search:" bar right below your search term, press the (+) button at the far right to add your search criteria. If the criteria is not in the list, select 'other' and you will find it there (File extension is in this category).

Granted, Spotlight does not satisfy some of your requirements such as excluding the file extension, but it is a good start. If you want more power, google for "enhanced spotlight" and you will find applications which might fit your needs. Finally, if you are command-line savvy, check out the 'find' command.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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