How to change the file extension to lots of files? Dec 1, 2021 To change the file extension to multiple files, do: for f in *.txt do mv -- "$f" "${f%.txt}.md" done Remember: GNU/Linux does not care about file extensions anyway…