Sunday, September 8, 2013

How find duplicate lines in 2 files in Linux

Please use  following command in linux to find duplicate lines in file1.txt and in file2.txt. Duplicate lines will be stored in duplicate.txt
comm -12 <(sort file1.txt) <(sort file2.txt) > duplicate.txt