Bash rename all file extensions in directory to lowercase

First to test how the renaming will look like you can use the command with -n switch as:

rename -n 's/\.([^.]+)$/.\L$1/' *

If you are satisfied just remove “-n” and all files will have it’s extensions renamed to lowercase.

rename 's/\.([^.]+)$/.\L$1/' *

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.