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 macintosh program that can find and replace text in a very large text file (7MB). I've tried TextMate, TextEdit and nano (command line) but both take a very long time (I've waited over an hour and still didn't finish). Am I being impatient, or is there a more efficient solution?

share|improve this question
7MB doesn't seem very large to me and 1 hour does seem like a long time. Is that compressed or uncompressed? Is the find and replace just that or are you using Regular Expressions? – AllInOne Dec 26 '12 at 18:58
What is slow, the loading of the file or the search/replace operation? Using Unix commands like sed would be a good alternative for big files but if you need help here please add some examples for strings to be searched and replaced. – patrix Dec 26 '12 at 18:58
As a benchmark I just used BBEdit to do a simple find and replace on a 30MB text file. Was so fast it didn't have time to draw a progress bar. This is on a 2.9 Ghz i7 iMac. – AllInOne Dec 26 '12 at 19:00
The file is uncompressed, and the loading of the file search/replace operation is extremely slow. I'll try BBEdit, it looks promising! – alexy13 Dec 26 '12 at 19:09
@patrix - My first thought was sed too, and then I saw the 7MB comment. 7MB is not a large file. I have 1GB+ log files floating around, and even those really aren't that large. My first thought is a poorly optimized regex. – Fake Name Dec 26 '12 at 20:07
up vote 4 down vote accepted

My question was solved by AllInOne: Download BBEdit. The time to search and replace went down from 1 hour+ to about five seconds.

share|improve this answer

I usually use Text Wrangler (the free incarnation of the full featured BBEdit) for working on text files that are too large for other tools.

share|improve this answer
Same thing. BBEdit is the paid version of TextWrangler with a few more features... either of them do not suck. – donlaur Dec 26 '12 at 19:47
Well, I'll be darned. Didn't know that. – ultraloveninja Dec 26 '12 at 19:52

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.