case-insensitive filesystem

Hello everyone,

If there is any chance I could create one? Really needed for my purposes but cannot find any mention about such option either in newfs or any other utilities.
 
Well, seems I'm forced to use ZFS.

The main purpose for the server is to keep stuff for Mac developers. Since OS X uses case-insensetive HFS+ by default, sometimes it could be a problem to have Help.txt and help.txt in the same folder :)
 
Here is a Perl script that scans for such files.

Tell the developers to use lowercase all the time.

Code:
use strict;
use File::Find;

my @subdirs;

usage() unless @ARGV;

foreach my $dir (@ARGV) {
        next unless ((-d $dir)&&(-r $dir)&&(-x _));
        find( sub { do_it($File::Find::name) if (-d $File::Find::name) }, $dir);
}

sub do_it {
        my $d=shift;
        unless(opendir(DIR, $d)) {
        warn "I can't open $d: $!";
        next;
        }
        my %dirents;

        while (my $f = readdir(DIR)) {
        next if ($f =~ /\.{1,2}$/);
        my $lc=lc($f);
        if (defined($dirents{$lc})) {
                print "In $d:\n [$dirents{$lc}] [$f]\n";
        } else {
                $dirents{$lc}=$f;
        }

        }
        closedir(DIR);

}

sub usage {
        print "$0: scan for 'FOO' and 'foo' in the same dir\n";
        print "Usage: $0 /some/dir/to/scan\n";
        exit(1);
}

__END__
 
Thank you. Guess I can mark this as solved — no any case-insensitivity on UFS but there are other political and administrative solutions :)
 
You can configure it for both, I believe.
I have heard that, but I would like to know which is the standard. I have heard UNIX is case-sensitive as standard; especially in the shell. But what if you run a GUI on top? Does that remain the same?
 
I have heard UNIX is case-sensitive as standard; especially in the shell. But what if you run a GUI on top? Does that remain the same?
It's the filesystem that's case-sensitive. The filesystem doesn't change when you run a GUI.
 
It's the filesystem that's case-sensitive. The filesystem doesn't change when you run a GUI.
Thanks for the info. I had heard that MacOS is case-insensitive as standard with the GUI and is only case-sensitive when you are using the "Terminal"... So my assumption was that there is some kind of separation in between.
From what I know about computers, a file system is system wide and does not change based on the interface you use - GUI or CLI.
 
I had heard that MacOS is case-insensitive as standard with the GUI and is only case-sensitive when you are using the "Terminal"
MacOS's HFS filesystem is case-preserving and case-insensitive.
 
By default, HFS is exactly like SirDice said. I think the root file system has to be configured that way. It is case-insensitive both from the GUI and from the command line. That can lead to humorous effects, for example:
Code:
# touch foo
# ls
foo
# ls FOO
FOO
# ls -l FoO
-rw-r--r--  1 ralph  ralph  0 Jun 27 21:26 FoO

When creating another HFS file system (on a separate disk or partition), it can be configured either case-insensitive or case-sensitive, either works fine. User's choice.
 
Back
Top