
The Rename Command(s) ExplainedĪs we mentioned above there are two main versions of rename running around in the wild.


But now you're probably wondering what is the "other" rename and how do I know which one I am using? In the next section we discuss the two different rename commands and how to switch between the two. $ rename -v s/txt/sql/ *.txtĪhh, that's better. Let's use the same example, but this time use the rename command. This is where the rename command comes in. sql: $ for i in * do mv -v "$i" "$.sql" done Let's create a for loop to rename all the. You cannot use it to rename multiple files without running it through a loop of some kind. The most glaring limitation of the mv command, as it pertains to renaming files, is you can only rename a single file.

Most people know that it is possible to rename a file with the mv command.
