Discovering "rename"
After 20+ years of using Unix-like systems, I'm still discovering those little but handy tools that make life easier. Today was the command "rename".
Renaming files and folders in bulk is always a tedious and time-consuming task that no one wants to do but has to at any point in their life. Today I needed to make a couple hundred filenames lowercase and before diving into the manual task I decided to do a quick search. And behold, "rename" was discovered (by me anyway).
A simple
$ rename -f 'y/A-Z/a-z/' *
inside the folder that contained all the files in question and done. I needed the "-f" because I'm on a Mac with a case-insensitive filesystem.
Ah! Also, it doesn't come installed on macOS, you have to use MacPorts or Brew. In my case
$ brew install rename
was enough to get it.