find . -type f -print0 | xargs -0 rename -n 's/foo/bar/g'
find . -type f -print0 | xargs -0 rename 's/foo/bar/g'