Skip to content
Advertisement

How to replace recursively part of file name in bash

I have a directory having subdirectories containing images files with a wrong name such like filename.jpg.jpg i want to replace this recursiveley with filename.jpg i have tried:

JavaScript

or

JavaScript

but none works

thank you

Advertisement

Answer

JavaScript

If you have a rename utility which uses perl regular expressions, then use the below command :

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement