比较列表中的文件

Loo*_*oom 2 shell-script file-comparison

我有一个文件列表 (<10) 作为某些命令的输出。例如:

$ find foo* -name bar*Test.groovy

foofoo/foo-tasks/src/test/groovy/foo_main/store/barEarthTest.groovy
foo-co/foo-tasks/src/test/groovy/foo_main/store/barMercuryTest.groovy
foo_ba/foo-tasks/src/test/groovy/foo_main/store/barMarsTest.groovy
foo_tr/foo-tasks/src/test/groovy/foo_main/store/barMarsTest.groovy
foo_P1/foo-tasks/src/test/groovy/foo_main/store/barJupiterTest.groovy
foo_P2/foo-tasks/src/test/groovy/foo_main/store/barTatooineTest.groovy
Run Code Online (Sandbox Code Playgroud)

我想知道这些文件中哪些是相同的,哪些是不同的。我不在乎确切的区别是什么。

以更方便的形式获取这些信息的方法是什么?

drl*_*drl 5

有几个代码可以为您完成大部分工作,例如:fdupes jdupes rdfind duff

几年前,我在http://www.linuxforums.org/forum/programming-scripting/195467-find-same-size-file.html#post924892 上发布了 fdupes 和 rdfind 的比较运行

以下是有关这4个的一些详细信息:

fdupes  finds duplicate files in a given set of directories (man)
Path    : /usr/bin/fdupes
Version : 1.51
Type    : ELF 64-bit LSB executable, x86-64, version 1 (SYS ...)
Help    : probably available with -h,--help
Repo    : Debian 8.9 (jessie) 
Home    : http://code.google.com/p/fdupes/ (pm)

jdupes  finds and performs actions upon duplicate files (man)
Path    : ~/executable/jdupes
Version : 1.5.1 (2016-11-01)
Type    : ELF 64-bit LSB executable, x86-64, version 1 (SYS ...)
Home    : https://github.com/jbruchon/jdupes (doc)

rdfind  finds duplicate files (man)
Path    : /usr/bin/rdfind
Version : 1.3.4
Type    : ELF 64-bit LSB executable, x86-64, version 1 (SYS ...)
Repo    : Debian 8.9 (jessie) 
Home    : http://rdfind.pauldreik.se/ (pm)

duff    duplicate file finder (man)
Path    : /usr/bin/duff
Version : 0.5.2
Type    : ELF 64-bit LSB executable, x86-64, version 1 (SYS ...)
Repo    : Debian 8.9 (jessie) 
Home    : http://duff.sourceforge.net/ (pm)
Run Code Online (Sandbox Code Playgroud)

贝斯祝福......干杯,博士