5

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?

6
  • 2
    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
    Commented Dec 26, 2012 at 18:58
  • 2
    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.
    – nohillside
    Commented Dec 26, 2012 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
    Commented Dec 26, 2012 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!
    – alexyorke
    Commented Dec 26, 2012 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
    Commented Dec 26, 2012 at 20:07

2 Answers 2

7

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

4

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.

2
  • Same thing. BBEdit is the paid version of TextWrangler with a few more features... either of them do not suck.
    – donlaur
    Commented Dec 26, 2012 at 19:47
  • 1
    Well, I'll be darned. Didn't know that. Commented Dec 26, 2012 at 19:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .