Say I have the following directory structure:
root
|-- dirA
|-- file.jpg
|-- file-001.jpg <-- dup
|-- file2.jpg
|-- file3.jpg
|-- dirB
|-- fileA.jpg
|-- fileA_ios.jpg <-- dup
|-- fileB.jpg
|-- fileC.jpg
|-- dirC
|-- fileX.jpg
|-- fileX_ios.jpg <-- dup
|-- fileX-001.jpg <-- dup
|-- fileY.jpg
|-- fileZ.jpg
So given a root folder, how can I find dups that have identical names (differing only by a suffix) recursively?
The name can be any string, and not necessarily file...
. The suffixes can be 001, 002, 003 and so on. But it is safe to assume that there will be a 3-digit numeric pattern and _ios
literally (for regex matching).
My linux foo is not very good.
Aucun commentaire:
Enregistrer un commentaire