change file extensions recursively 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
find . -name "*.t1" -exec rename 's/\.t1$/.t2/' '{}' +
shopt -s globstar
for f in **/*.t1; do
mv "$f" "${f%.t1}.t2"
done