Let’s say you have a bunch of files in a directory with names like
fountain.jpeg, etc. Your OCD insists that you rename them all to more “regular” names like
fountain.jpg. If you use
zsh, pat yourself on the back for using a cool shell, and run these commands:
You probably know this already, but it’s worth mentioning. Single quotes around the patterns is important because we want
autoload zmv zmv -W '*.jpeg' '*.jpg'
zmvto interpret the pattern;
zshshould pass the pattern as such to
zmvwithout expanding it.