How to count differences between two files on linux?

后端 未结 7 581
一整个雨季
一整个雨季 2020-12-23 13:45

I need to work with large files and must find differences between two. And I don\'t need the different bits, but the number of differences.

To find the number of dif

7条回答
  •  北海茫月
    2020-12-23 14:13

    If using Linux/Unix, what about comm -1 file1 file2 to print lines in file1 that aren't in file2, comm -1 file1 file2 | wc -l to count them, and similarly for comm -2 ...?

提交回复
热议问题