in reply to Best way to read line x from a file

You might also consider using Mmap. You can treat the file as a variable, and only the portions of it that you actually access will get read from disk, and then in a very efficient manner.
  • Comment on Re: Best way to read line x from a file