global search and replace file name extensions

Asked by Danney Webb

All the online photo sharing sites are unable to find any of my image files because Picasa for Linux saves the files as uppercase .JPG and they are looking for lowercase .jpg. When I change an individual file to a lowercase extension the websites can then find my image file. Since I have many image files I want to know if there is some way in Ubuntu that I can perform a global search and replace to change all my image files to a lowercase extension.

Thanks, Danney Webb

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu yelp Edit question
Assignee:
No assignee Edit question
Solved by:
Danney Webb
Solved:
Last query:
Last reply:
Revision history for this message
David Jones (dj) said :
#1

Perl provides a really nice one-line for this kind of thing:

perl -p -i -e ’s///g’ *

David
in TN

Revision history for this message
Danney Webb (danney-webb) said :
#2

Thanks David, but being a complete newbie to Linux. I am not sure how to use this. I know it needs to be entered in Terminal. but it is not working for me. How exactly do I enter the parameters to change the JPG extensions to jpg?

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#3

Please open a Terminal from the menu Applications → Accessories → Terminal and type:

cd where_your_upper_jpg_are

and then type:

perl -p -i -e 's///g' *

for more basic terminal help: https://help.ubuntu.com/community/UsingTheTerminal

Thank you

Revision history for this message
Danney Webb (danney-webb) said :
#4

Thanks to all, I guess this cannot be done globally but only directory by directory.
Danney