I have 2 large files (each about 500k lines or 85mb) containing the checksum of the file and the filepath itself. What is the best way to get the differences between the files based on the checksum? I can write a Java program, script, etc. but the goal is it has to be efficient.
For example, I have FileA:
ec7a063d3990cf7d8481952ffb45f1d8b490b1b5 /home/user/first.txt
e0f886f2124804b87a81defdc38ad2b492458f34 /home/user/second.txt
File B:
650bc1eb1b24604819eb342f2ebc1bab464d9210 /home/user/third.txt
ec7a063d3990cf7d8481952ffb45f1d8b490b1b5 /home/user/blah/dup.txt
I want to output two files containing the unique files in File A and B.
UniqueA
e0f886f2124804b87a81defdc38ad2b492458f34 /home/user/second.txt
UniqueB
650bc1eb1b24604819eb342f2ebc1bab464d9210 /home/user/third.txt
In this case, "first.txt" and "dup.txt" are the same since their checksum is the same so I exclude it as not being unique. What is the most efficient way to do this? The files aren't sorted in any way.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)