Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is case sensitivity an Operating System specific standard or is it based on the file system?

I know in Windows you can't have two files the same name but under Linux you can if the case in a character is different.

share|improve this question

3 Answers 3

It can actually be both.

In Windows, the main file system (NTFS) actually supports having case-sensitivity. But the shell (explorer) doesn't allow it.

You can still interact with the file system according to POSIX rules (where access would be case sensitive) by passing the appropriate flag when calling CreateFile. Although this is discouraged and probably shouldn't be done on a Windows-based system.

From Naming Files, Paths, and Namespaces:

Do not assume case sensitivity. For example, consider the names OSCAR, Oscar, and oscar to be the same, even though some file systems (such as a POSIX-compliant file system) may consider them as different. Note that NTFS supports POSIX semantics for case sensitivity but this is not the default behavior.

share|improve this answer
    
How does Explorer not allow it? I can connect to case-sensitive volumes and browse files just fine... –  MattDMo Oct 17 '13 at 17:43
    
@MattDMo: I never implied that you couldn't –  Oliver Salzburg Oct 17 '13 at 17:45
    
I was referring to the 2nd sentence of your 2nd paragraph. I'm just wondering what you mean by that. –  MattDMo Oct 17 '13 at 17:46
    
@MattDMo: Explorer won't allow you to create two files in the same directory on an NTFS volume that would have identical names if both file names were converted to the same case. Meaning it won't allow for case-sensitivity on an NTFS volume when creating files (even though NTFS is technically perfectly capable of handling that). –  Oliver Salzburg Oct 17 '13 at 17:49
    
OK, I see. It will show you foo.txt and Foo.txt, but not allow you to create a new file named FOO.TXT. Is this still the case even in 64-bit versions of Win7/8? –  MattDMo Oct 17 '13 at 17:50

It seems that Wikipedia has some solid information that may help answer your question:

In Unix filesystems, filenames are usually case-sensitive. Old Windows filesystems (VFAT, FAT32) are not case-sensitive (there cannot be a readme.txt and a Readme.txt in the same directory) but are case-preserving, i.e. remembering the case of the letters. The original FAT12 filesystem was case-insensitive. Current Windows file systems, like NTFS, are case-sensitive; that is a readme.txt and a Readme.txt can exist in the same directory. Windows disallows the user to create a second file differing only in case due to compatibility issues with older software not designed for such operation

Source: Wikipedia

The reason that Windows is case-sensitive may also be answered by their support article here:

As part of the requirements for POSIX compliance, the Windows NT File System (NTFS) provides a case-sensitive file and directory naming convention. Even though NTFS and the POSIX subsystem each handle case-sensitivity well, 16-bit Windows-based, MS-DOS-based, OS/2-based, and Win32-based applications do not.

Wikipedia covers that compliance here: POSIX. Although Windows is not listed as fully POSIX compliant.

share|improve this answer

Case-sensitivity is based on the file system. In the Windows world, FAT, VFAT, and FAT32 are case-insensitive, meaning foo.txt and Foo.txt cannot exist as separate files in the same directory. NTFS is case-sensitive, as are a majority of modern filesystems used in the Linux/UNIX world (EXT2/3/4, ReiserFS, ZFS, etc.). Foo.txt can happily coexist with foo.txt, FOO.TXT, and others.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.