69

What are your recommendation for opening large text files on OS X? I found both BBEdit and Textmate to be struggling in this department.

7
  • 1
    there's a dup of this on stackoverflow: stackoverflow.com/questions/952886/… Commented Oct 25, 2010 at 18:58
  • (That SO question should probably be moved to Super User or here :)
    – Jonik
    Commented Oct 26, 2010 at 17:15
  • 1
    The 64bit version of Emacs should also be pretty good when opening such big files.
    – Gio
    Commented Jan 16, 2012 at 10:46
  • 4
    Define "large". Usually it becomes interesting when the files does not fit in available memory. Commented Apr 24, 2013 at 11:35
  • 1
    Very old thread, but pointing out that BBEdit (and TextMate) are both 64-bit now. BBEdit, in particular, will have no problem with the 500+ MB file described above. Commented Aug 11, 2018 at 16:01

10 Answers 10

53

I'm using HexFiend to work with a 60 GB text file and it works great (apparently it can handle files as large as 118 GB).

8
  • 1
    Hex Fiend is way faster than VIM on the command line and blows less or more away. Especially for multi-gigabyte single-line text files. Recommended. Commented Aug 30, 2015 at 5:14
  • 1
    +1 I just tried hex fiend on the strength of this rec and it snarfed up a 3+gb inbox archive like instantly, and then successfully searched through the whole thing for a word in under 20 seconds. Commented Jan 22, 2016 at 15:47
  • 2
    this could be the notepad++ or even better but needs some tweeks. It just prints whatever there in the file no matter of new line or not. I will see if I can make some changes on my freetime to make it taking consideration of new lines.
    – Olgun Kaya
    Commented Jun 19, 2017 at 4:53
  • 9
    Yeah but it ignore line breaks :(
    – Gerry
    Commented Jun 20, 2018 at 1:44
  • 2
    Neat, small and super fast. But I agree with the last comment: it doesn't really work as replacement for a text editor, when you want to look at well, line based text files. Too bad, a single checkbox that says "show by lines" or something would make it a perfect tool.
    – GhostCat
    Commented Nov 6, 2018 at 13:04
25

I found MacVim pretty good at opening large files.

There's even a plugin to speed it up, if the file is really large.

(If you don't want to compile it yourself, you can download a DMG to install it pre-built.)

10
  • 3
    The command-line version vim is already available in Terminal.app.
    – mouviciel
    Commented Oct 24, 2010 at 19:46
  • True, but since he talked about BBEdit and Textmate, I assumed he wanted graphical application and not in command-line. Commented Oct 24, 2010 at 19:54
  • vim helped me edit a 512MB+ text file. I wish there was something like EM Editor (emeditor.com) for Mac.
    – fnurl
    Commented Mar 21, 2011 at 19:40
  • Kill Vim with fire.
    – Jimbali
    Commented Dec 3, 2015 at 11:06
  • I easily did a find and replace on a 1.06GB file with MacVim and LargeFile. brilliant!
    – Andyg8
    Commented Jul 12, 2017 at 22:37
10

BBEdit is pretty much the standard for opening large text files on a Mac. I've opened some good-sized files with it, and BBEdit didn't even break a sweat. It is not entirely free - you do not have to pay for a license unless you want features that are in the pro activation above and beyond the free license.

How large of a file are you talking about? And how much RAM does your Mac have (both installed and free)?


Edited to add…

Bare Bones released BBEdit 9.6 today, and according to the Release Notes1 (under Changes):

It is now possible to open files significantly larger than before; the ceiling isn't unlimited, but it is no longer limited by the previously extant constraints in the OS.

Sounds to me like it's worth upgrading (free for anyone with BBEdit 9.x) and trying again.

1 If you've never read a Bare Bones release notice before, you should. Even if you have no interest in BBEdit. Even if you have no interest in Bare Bones. Even if you have no interest in text editors in general. They're that good. Yes, really. Iä! Iä! Pnoies fhtagn!

2
  • +1 for recommending BBEdit and "Iä! Iä! Pnoies fhtagn!". My favorite so far is "The ponies' saronite shoes have been reinforced with titanium, and have a buff applied which increases both ground and flight speed by 30%." Commented Oct 26, 2010 at 22:48
  • I reviewed a previous version of BBEdit for Macworld, and was sorely disappointed that I wasn't allowed to put "No actual ponies" under the Cons section.
    – Dori
    Commented Oct 26, 2010 at 22:50
4

TextWrangler is a great tool for opening editing and saving large files. I wouldn't recommend if for copying and pasting large amounts of content though. Use it if you don't want to have to deal with the vi interface/commands. Like Loic mentioned, MacVim is a great app if you're more familar with vi.

Use BBEdit for free now that TW is discontinued if needed.

1
  • 2
    Given that TextWrangler is BBEdit's little brother, I'd guess that someone who is already using BBEdit won't find anything new there.
    – Dori
    Commented Oct 26, 2010 at 21:38
3

Check Sublime Text 2 out. It is one of the best out there.

3
  • 1
    And Sublime Text 3 more faster then previous version.
    – Vetal4eg
    Commented Apr 24, 2013 at 9:11
  • 11
    I've been working with a 1.37 GB log file generated by parsing a 13 GB binary file, and both versions of Sublime Text have been unimpressive. They took a minute or more to open the file, and trying to type in search strings resulted in temporary spinning-pizzas-of-death while the program was doing unrequested searches on my partially-typed text. 010 Editor, although it has a clunky interface, is quite fast and stable in comparison.
    – Bob Murphy
    Commented Jun 18, 2014 at 21:58
  • 2
    Sublime Text is nice for medium size files but if you try to open a 50GB file (having 12GB RAM) it crashes.
    – skan
    Commented Oct 14, 2016 at 19:28
2

If you are dealing with files over 2 GBs I recommend 010 Editor. It won't load the entire file in memory which means you can use it to open files larger than your available RAM and opening times will be much shorter (took about 20 seconds to open a 7GB file).

1
  • Commercial license is $130.... OUCH. That's more than Webstorm. That's hard to justify.
    – jcollum
    Commented Oct 6, 2022 at 23:52
2

If you are reading the file only, use the less command. You can navigate and search through the file like vi, but much faster and without the nasty 'line too long' type problems. For working with big production logs, this is an invaluable tool.

3
  • 2
    There is also view for a read-only vi session.
    – lhf
    Commented Dec 13, 2012 at 11:47
  • @lhf less works on a window of the file, vi reads in the whole file in memory. Commented Apr 24, 2013 at 11:37
  • He doesn't want to read only, he wants to edit. He says so right in the title of his question.
    – mysomic
    Commented Nov 12, 2019 at 16:47
1

For me, where BBEdit choked on 750MB, UltraEdit (not free) worked satisfactorily fast.

1

My first choice is SlickEdit. It looks, well, is a bit old fashioned, but I have seen no other editor that deals with large files (even GBs of text) that fast, and still giving a ton of features.

It is not a modern IDE by current day standards, but a really powerful editor, and as said, the only one I ever used that really works with large files.

2
  • $100 !! wow how do these companies justify that. I use Webstorm all the time and it's about that much but it's a full-fledged IDE.
    – jcollum
    Commented Oct 6, 2022 at 23:56
  • 1
    @jcollum I would rate SlickEdit as "legacy" "enterprise" product, cash cow like. Meaning: It would really need a major overhaul, as it is in many areas no longer up to free/much cheaper competition. But that doesn't happen ... so it is slowly dying I guess. I definitely do not use it for code development. But my company still pays for the licence, so I keep it around ... as said: even in 2022, products like Visual Studio code have issues when you go for files in the GB range. Whereas I easily worked with 20 GB files on AIX 12 years ago with Slick Edit.
    – GhostCat
    Commented Oct 7, 2022 at 6:53
0

http://code.google.com/p/macvim/ worked with a 1 gig file searching file took about 1 min

You must log in to answer this question.

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