Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Rename Multiple Files On The Command Line With zmv In zsh

This will rename all the `.mdx` files in the current directory to be `.txt` files

Code

autoload zmv
zmv '(*).mdx' '$1.txt'

one liner:

Code

autoload zmv; zmv '(*).mdx' '$1.txt'

autoload is require because `zmv` isn't loaded by default

via NyxKrage on twitch