Ik I can use grep to find filenames with specific characters and then print that to a list but idk how to utilize said list to rename. I found another solution which’s using mv but couldn’t figure out how to make it work w subdirectories. I think using both grep and mv in unison’s the answer just idk how to do it. plz halp


Two ways:
in bash, using the extglob option:
(If you want to type it in a single line, you need to add semicolons as separators.)
The ‘"’ are only needed if file names contain whitespaces.
Using find:
find . -name ‘Sevilla.*big.jpg’ > t
now, you edit the file named “t” with Emacs or vim so that you duplicate the file names, modify them as you want, and copy them using the copy-rectangle command right to the collumn with the original names. (Vim also offers this functionality, it is super useful to learn!) Delete any names of files you don’t want to change. save the result to t.
Then, in bash:
Alternatively, you could also insert the mv command as a first collumn in t, save t and do:
This variant wouldn’t work with spaces in filenames.
Use the mmv command