Open massive file on Mac?

Solution 1:

split can do it -

 split -b 200m [file]

will split the file into 200MB chunks. You can split on lines with -l

 split -l 1000 [file]

will split the file into 1000 line chunks.

If that doesn't work, there is a really good hex editor for Mac, Hex Fiend which can open massive files:

Work with huge files. Hex Fiend can handle as big a file as you’re able to create. It’s been tested on files as large as 118 GB.

Hope that helps!

Solution 2:

Have you tried any of the following command line tools:

  • sed or awk: stream editors, but these can at times require complex expressions to get the desired output
  • split: splits files into blocks of given number of bytes, lines, etc.
  • csplit: splits file based on context given by regular expression

One of split or csplit might do the job, depending on how they manage memory use. Check out this page for more Info on split and csplit .

For even more info on these tools try your favourite search engine, or type man <cmd-name> at the command line in the Terminal.

If you can provide more context on how you want to split the files, I'm sure someone with expert knowledge of sed/awk or regular expressions could help.