Care to elaborate?Ajax said:Really needed for my purposes
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__
I do have a question. Is the ZFS file system case-sensitive or insensitive?
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?You can configure it for both, I believe.
It's the filesystem that's case-sensitive. The filesystem doesn't change when you run a GUI.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?
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.It's the filesystem that's case-sensitive. The filesystem doesn't change when you run a GUI.
MacOS's HFS filesystem is case-preserving and case-insensitive.I had heard that MacOS is case-insensitive as standard with the GUI and is only case-sensitive when you are using the "Terminal"
# touch foo
# ls
foo
# ls FOO
FOO
# ls -l FoO
-rw-r--r-- 1 ralph ralph 0 Jun 27 21:26 FoO