Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
The hash sum will be the same only for absolutely identical files. Similar to her not to be tracked
You can compare text files by content using the diff utility.
https://www.opennet.ru/man.shtml?topic=diff&catego...
Be specific with the meaning of "similar".
Similar in meaning and similar minus, say, - the number of spaces - these are different things ....
You can only determine exact matches with hash sums.
The sum hash can be calculated using md5sum (fast but collisions are possible) and sha256sum (considered reliable). There are other implemented algorithms but they are not commonly used.
The same hash sum is only with a complete match of the files: one bit changed and the hash sum is completely different. Collisions are possible with md5 (two files correspond to the same hash), but the chance of running into this is vanishingly small.
On the top, this can be done like this:
find -name "*txt" -exec sha256sum {} \; | sort | uniq -D -w 65
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question