
Alias to Lowercase All Filenames in a Folder
Add the following alias to your ~/.zshrc or ~/.bash_profile and then when you‘re in a directory, you can just type toLowerCase (thanks JavaScript for the camelcase syntax).
alias toLowerCase='for f in *; do mv "$f" "$f.tmp"; mv "$f.tmp" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done'Make sure you reload your already open terminals with source ~/.zshrc or source ~/.bash_profile.
References:
Posted in: #bash by Dan Leatherman
@ https://danleatherman.com/lowercase-filenames-alias/
Webmentions
These are webmentions via the IndieWeb and webmention.io. Mention this post from your site:
More posts
- Previous:
- Next:

