Check if two files have the same content

I would like to check if each of several thousand pairs of files contains the same data. Can someone point me in the right direction?

+4
source share
1 answer
require 'fileutils'

FileUtils.compare_file('file1','file2')

returns trueif and only if the files file1and file2identical.

+14
source

Source: https://habr.com/ru/post/1616293/


All Articles