How can I rename images/ files recursively? For example:
folder
- subfolder1
- a-copy.jpg
- subfolder2
- b-copy.jpg
- subfolder3
- c-copy.jpg
I would like to get:
folder
- subfolder1
- a-thumb.jpg
- subfolder2
- b-thumb.jpg
- subfolder3
- c-thumb.jpg
I tried:
for i in $(find . -iname '*.jpg') ; do rename 's/-copy/-thumb/' *.jpg; done
Doesn't work off course! Any idea?