How to change an extension of many files

In a Linux terminal:

$ for f in *.txt; do mv -- "$f" "${f%.txt}.text"; done

will rename all *.txt to *.text files.

About albertsk

Professor at the University of Hawaii
This entry was posted in Uncategorized. Bookmark the permalink.