Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2405 of /var/www/drupal/includes/

Renaming multiple files at a time

This command took me 20 minutes to find. Let's hope that this helps someone and me next time I need to do something similar.

find . -name '*foo*' -type f -exec bash -c 'mv "$1" "${1/foo/bar}"' -- {} \;