Home > OS >  Find the occurrences of different versions of a file
Find the occurrences of different versions of a file

Time:09-12

I've got a couple of hundred files that may all be the same, or there may be two or more variants. I'd like to compare them all, and produce some sort of report on how many versions there are, and which ones are the same as each other. I imagine output something like:

versionA: file1, file3, file137
versionB: file2, file16
...

or

file1: versionA
file2: versionB
file3: versionA
...

...but really anything that more-or-less accomplishes the same thing would be fine.

I'm a linux person stuck on a Windows box, so Powershell works, but I've got cygwin and most of the usual bash/linux toolbox to work with as well. I could imagine hacking together some monstrous recursive diff -s of every file with every other, but it seems like there ought to be a better way.

CodePudding user response:

KamilCuk said it in a comment, but I'll make an answer out of it just so I can mark this as solved:

md5sum * | sort

Thanks,

  • Related