in reply to What is the best way to remove(delete) specific lines from a very large file?

What is the best way to remove(delete) specific lines from a very large file?

Ah. The post with a succinct question!

Read from file A, write anything you don't want to delete to file B. If the files are really large, it'll go faster to have the files on separate disk drives. Moving disk heads is relatively expensive. You can minimize head contention by reading from one head (file) while writing to a separate head (file). Unless, of course, the source file is fragmented, or the target disk is heavily fragmented.

  • Comment on Re: What is the best way to remove(delete) specific lines from a very large file?