How to compare large text files?
问题 I have a general question on your opinion about my "technique". There are 2 textfiles ( file_1 and file_2 ) that need to be compared to each other. Both are very huge (3-4 gigabytes, from 30,000,000 to 45,000,000 lines each). My idea is to read several lines (as many as possible) of file_1 to the memory, then compare those to all lines of file_2 . If there's a match, the lines from both files that match shall be written to a new file. Then go on with the next 1000 lines of file_1 and also