我已经解决了所有类似的问题 + 安装了一些命令行实用程序,例如 duff,但没有成功。
在我的图像目录中,我有同名但具有不同扩展名(jpg 和 png)的图像。我只想打印具有不同扩展名的重复文件名的文件名。(例如 foo.jpg & foo.png) 或至少一个文件名 (foo)
到目前为止,我尝试了这些方法
find . -exec bash -c 'basename "$0" ".${0##*.}"' {} \; | sort | uniq
find . -type f \( -name "*.jpg" -o -name "*.png" \)
Run Code Online (Sandbox Code Playgroud)
这些命令中的大多数都会向我返回Nothing OR All the files OR unique filename but not the Duplicate those。