Take the 2-minute tour ×


I have a NAS (Synology DS1813+ based on DSM 4.3). It runs a version of linux, so the file system is (supposedly) case sensitive. I access the NAS with 2 computers. One of them runs Windows 7 (case insensitive file system) and connects to the NAS via a network share. The other runs Linux Mint (case sensitive file system) and mounts the NAS with CIFS.

I connected a digital camera (Canon 7D) to the Windows computer and imported the images from the camera into the NAS via the network share. The images that are stored on the NAS have upper case extensions (IMG_8835.JPG).

Later, on the Linux machine, I tried to rename these images in bulk so the extensions would be lower case with the following commands and output:

$ find . -name '*.*' -exec sh -c 'a=$(echo {} | sed -r "s/([^.]*)\$/\L\1/"); [ "$a" != "{}" ] && mv "{}" "$a" ' \;
mv: ‘./IMG_8835.JPG’ and ‘./IMG_8835.jpg’ are the same file


$ rename s/.JPG/.jpg/ *.JPG
IMG_8835.JPG not renamed: IMG_8835.jpg already exists

This indicates that the file system is case insensitive. Correct?

Additionally, I tried:

$ rename -f s/.JPG/.jpg/ *.JPG

The output of this command was blank so I suspected it worked. But then when I reviewed the files, they still had the upper case extension. The files are not duplicated. There are not any files of the type *.jpg. They are all still *.JPG.


  1. Is there a command line (bash command) that will report the case sensitivity of both the local and remote file systems?
  2. It appears the file system is case insensitive. This perplexes me. How could that be? Both the remote file system on the NAS and the local file system on the box running Linux are (supposedly) case sensitive file systems.
  3. Is it possible that even though the NAS file system is (supposedly) case sensitive, since the folders and files were created on the NAS from Windows while the NAS was attached via a network share, that the Windows created files and folders are case insensitive? If so, can the case sensitivity of the windows created objects be modified when connected to the NAS from a Linux box?

NOTE: This question is not a duplicate of this question because this question is asking about the case sensitivity of the file system rather than how to rename the files in bulk.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

A friend pointed me to this. The linked article is 8 pages long, but it is verbose in its explanation. The short version of the answer is:

... And that brings me to what I really want to discuss, which is how 
CIFS Server (Samba) deals with this.

As you would expect from an application that was grown to bridge 
the gap between the Unix and Windows worlds, it is very flexible. 
This is both good and bad - with flexibility comes responsibility, 
and sometimes not a little confusion. There are four configuration 
options that Samba provides to allow one to define its behavior 
when dealing with matters of 'case': 

preserve case = (yes/no) 
short preserve case = (yes/no) 
default case = (upper/lower) 
case sensitive = (yes/no)

The solution is to configure Samba to handle case sensitivty (or case preservation issues) the way that works for your specific needs.

share|improve this answer

Your Answer


