chmod set permissions for files and directories code example
Example 1: change file recursively
find . -name "*.t1" -exec rename 's/\.t1$/.t2/' '{}' +
Example 2: change file recursively
shopt -s globstar
for f in **/*.t1; do
mv "$f" "${f%.t1}.t2"
done