Distinción de mayúsculas y minúsculas de extensión de archivo en CentOS

I'm using CentOS. There are >10M images in one of my folders, which are furthur grouped into subdirectories.

The issue is that some of my images are named as abc.jpg and others are named as xyz.JPG. So, when i try to access xyz.jpg, it says "File not found" as the extension is case-sensitive.

Is there any way to rename all JPG to jpg, or a httpd config which works around this issue.

Gracias por tu ayuda.

preguntado el 28 de agosto de 12 a las 09:08

Puede que estés buscando el rename utility. I believe it's in most Linux distributions. -

@HighPerformanceMark - Thanks for replying. Will give it a try. -

1 Respuestas

Sin rename puedes hacer en bash:

for f in *.JPG; do mv "$f" "${f%.*}.jpg"; done

Respondido 28 ago 12, 09:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.