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

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