linux change extension of all files code example
Example 1: change all file to another
for f in *.txt; do
mv -- "$f" "$(basename -- "$f" .txt).text"
done
Example 2: bash change file extension
rename "s/oldExtension/newExtension/" *.txt
for f in *.txt; do
mv -- "$f" "$(basename -- "$f" .txt).text"
done
rename "s/oldExtension/newExtension/" *.txt