Question: Problem using terminal to delete duplicates
I cannot figure this out even after extensive research.
I have a large set of folders that contain file duplicates with (1) appended to the file name. Too many to want to do this manually.
The challenge is the ( ) characters are special characters in terminal.
The pattern is:
Some of the sub folders have (data) in the folder names and some of the file names have the parens, i.e, (data) in the file names. I need to recursively delete all, and only, files that end in (1) (or (1).ext, or (1).)
I have tried a couple duplicate finders, but they either require manual selection or randomly pick one or the other to keep.
How can I do this?
(I can use any OS X version for this)
MacBook Pro, macOS Sierra (10.12.6), MacBook Pro 11,2 16GB RAM, SSD