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.

What's a good way to check if my file system is case-sensitive (with file names) on Windows, Mac, and Linux?

share|improve this question
    
Aside from reading the doco, do you mean? –  JdeBP Dec 23 '11 at 11:08

1 Answer 1

up vote -1 down vote accepted

Write a script that enumerates some files, change the case on the filenames, then see if those new filenames exist (without modifying any files or writing anything to the filesystem). If they do, the filesystem is not case-sensitive. I would check a number of files in case there happens to be both "myfile" and "MYFILE" in the same directory.

share|improve this answer
2  
Actually, you'd need to check that both files exist. NTFS is case-preserving, but the win32 subsystem is case-insensitive. So a rename would work and the filename would be changed, but if you tried to create a different file with the same name with different cases, it would fail or overwrite (depending on what you asked for). –  afrazier Dec 7 '11 at 17:56
    
Right - if both files exist, then the filesystem is not case-sensitive. If a file exists on NTFS with the name "myfile" and I check for the existence of "MYFILE", it will say that the file exists (the first step in my solution is to enumerate some files, so a check on the originals would be redundant). –  Brian Dec 7 '11 at 19:02

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.