Linux not picking up correctly product image paths and folders- different upper and lower cases creating havoc

We are trying to load products and images onto our website but we are using a CENTOS Linux server and it is not matching up with the paths we were given. Simple example /Tire.jpg is already ready to go into the site and /TIRE.jpg is what Linux seems to have to have. I don’t know if there is a program or an easy way to get these to match up as I hear Linux has to match case on everything, pictures, paths, folders, etc. Everything we are trying to load came already ready but the cases don’t match and I have no idea how to correct this without going into each one manually and editing it. Please help.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

On Linux systems, all file names are case sensitive. If you need to rename files from the command line, there are many ways to do it. For example, if you wanted to recursively make all files on a path lowercase, you could use:

find ./ -type f -exec rename 'y/A-Z/a-z/' {} \;

What this is doing is finding all files in the directory with find ./ -type f then executing the command rename 'y/A-Z/a-z/' on each one. This uses a regular expression to find all upper case characters and change them into lower case ones.

Though this might not be the best solution for your problem. It’s a bit unclear what has led to your issue. If you could tell us more about the software you are using and what you are trying to accomplish, we might be able to help you better.