Text editor to edit large (4.3 GB) plain text file

Another method is to use split. Split the file into 8 pieces and manipulate the files with a editor. After that, you reassemble the files again.

split -b 53750k <your-file>

cat xa* > <your-file>


SYNOPSIS
       split [OPTION]... [INPUT [PREFIX]]

-a, --suffix-length=N
              use suffixes of length N (default 2)

       -b, --bytes=SIZE
              put SIZE bytes per output file

       -C, --line-bytes=SIZE
              put at most SIZE bytes of lines per output file

       -d, --numeric-suffixes
              use numeric suffixes instead of alphabetic

       -l, --lines=NUMBER
              put NUMBER lines per output file

Try joe. I just used it to edit a ~5G SQL dump file. It took about a minute to open the file and a few minutes to save it, with very little use of swap (on a system with 4G RAM).


you will not find them. If you want to replace some lines in this file, you can look at with less or grep and use sed to search and replace some lines.

like this:

sed -e 's/oldstuff/newstuff/g' inputFileName > outputFileName

on Wikipedia are some useful examples: http://en.wikipedia.org/wiki/Sed