I&#x27;ve used a rename(1) utility^ that is apparently part of some Perl distribution. It&#x27;s always been available on my Ubuntu systems and I haven&#x27;t gone out of my way to install it. bar ⇒ baz would be something like: rename &#x27;s&#x2F;\.bar$&#x2F;.baz&#x2F;&#x27; *.bar<p>You can dry-run first with `-n` flag if you&#x27;re worried you didn&#x27;t do it right, which is admittedly too possible. A bit more verbose, but a bit more powerful too.<p>^ <a href="http:&#x2F;&#x2F;manpages.ubuntu.com&#x2F;manpages&#x2F;trusty&#x2F;man1&#x2F;prename.1.html" rel="nofollow">http:&#x2F;&#x2F;manpages.ubuntu.com&#x2F;manpages&#x2F;trusty&#x2F;man1&#x2F;prename.1.ht...</a>