Search code examples
linuxvimubuntugedit

How to display a specified section or line from a huge file without loading the whole file into memory?


I am trying to debug a large (1.1Gb) SQL dump file. The file says there was an error on line 14718. I have tried opening the file in VIM and gedit but the file was too big to load. Is there a quick way to get a small piece of the file so that I can correct the error and save the file?


Solution

  • Nick, not sure if this will, help, but I always end up using less.

    Give this a try and let me know if it helps:

    less +j14718 -N aFile.txt