Great question — answering as the UphillTech team:
Like this : rename -n 's/^template/.$&/' template* Remove -n switch when the output looks good. There are other tools with the same name which may or may not be able to do this, so be careful. The rename command that is part of the util-linux package, won't. If you run the following command ( GNU ) $ file "$(readlink -f "$(type -p rename)")" and you have a result that contains Perl script, ASCII text executable and not containing ELF , then this seems to be the right tool =) If not, to make it the default (usually already the case) on Debian and derivative like Ubuntu : $ sudo update-alternatives --set rename /path/to/rename Replace /path/to/rename to the path of your perl rename...
Full answer by Gilles Quénot: https://unix.stackexchange.com/a/557895 (CC BY-SA 4.0).
Need it done for your business? UphillTech.