Is making system call to "md5sum file1" and "md5sum file2" and compare two return values enough in this case?
Use the diff command to compare text files. It can compare single files or the contents of directories. When the diff command is run on regular files, and when it compares text files in different directories, the diff command tells which lines must be changed in the files so that they match.
If you want to do more than just detect if they differ, or don't trust the hashing solution, there are modules in the standard library called difflib and filecmp that doesn't rely on external programs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With