Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 查找同一子目录中具有相同MD5的文件_Linux_Bash_Shell_Find_Duplicates - Fatal编程技术网

Linux 查找同一子目录中具有相同MD5的文件

Linux 查找同一子目录中具有相同MD5的文件,linux,bash,shell,find,duplicates,Linux,Bash,Shell,Find,Duplicates,我有以下命令: find myfolder -type f -exec md5sum '{}' ';' | sort | uniq --all-repeated=separate -w 15 > dupes.txt 它创建一个文件dupes.txt,其中包含myfolder目录中的所有重复图像 我的目录结构如下所示: /myfolder |- /1 |- /2 |- /.. |- /20000 目前的问题是,即使在不同的子目录中,它也会列出相同的图像 我需要的是,它只在相同的子

我有以下命令:

find myfolder -type f -exec md5sum '{}' ';' | sort | uniq --all-repeated=separate -w 15 > dupes.txt
它创建一个文件dupes.txt,其中包含myfolder目录中的所有重复图像

我的目录结构如下所示:

/myfolder
 |- /1
 |- /2
 |- /..
 |- /20000
目前的问题是,即使在不同的子目录中,它也会列出相同的图像


我需要的是,它只在相同的子目录中搜索。为了实现这一点,我需要如何调整通讯器?解决方案实际上是:

find data-aligned -type d -exec fdupes -dN {} \;

如我对问题的评论中所述。

确定已解决:查找-类型d-execfdupes-n{}\;add-dN表示删除,不提示。find data aligned-type d-exec fdupes-dN{};