Change character in filename linux bash

I’m figuring this out for some time. It’s not that I can’t read but most of the time when trying out bash stuff you can make more damage then good to your system so you have to be really really easy.

Now, this one here makes the difference. I had a job to change & in many many many files in different directories and subdirectories and after trying many scripts this one came up working just fine and fast.

find . -type f -exec rename 's/string1/string2/g' {} +

If you want to target specific filename extension then you need to add:

find . -type f -name "*.webp" -exec rename 's/&/-/g' {} + 

It was taken from here:

https://unix.stackexchange.com/questions/416018/how-to-replace-a-string-in-all-folder-and-file-names