lkml.org 
[lkml]   [1996]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectfilenames
Date
> Justin Dossey <dossey@flex.net> writes:
> On Fri, 3 May 1996, Mark Lehrer wrote:
>
> > of course, the best thing would be to finally have a standard
> > non-case-sensitive file system on unix. preservation of case
> > is important, but being case-sensitive when looking up a file
> > is a serious time waster.
>
> Oh, I disagree. Having the fs be sensitive (to the fault you describe)
> to cases gives me double the filename possibilities. Additionally,
> if there are 3 files in a directory that begin with the letter "M,"
> and the filesystem is not case sensitive in that way, example:
>
> Makefile
> memlook.c
> makelib.sh
>
> I can just type M<tab> and get the Makefile right now. The situation you
> describe makes that impossible. If you don't use filename completion or
> wildcards, then yes, you're wasting time--just don't blame it on the
> system. Capitals exist for a reason in Linux.

That is not true. Nobody said to fold case like DOS would.
The suggestion was that filename lookup would be case insensitive.
If you type M<tab> the shell gives you the Makefile, but if you
run 'cat MemLook.c' you will get memlook.c and 'cat makefile' gets
you the Makefile.

Although Win95, WinNT, OS/2 and such do not allow both 'Makefile' and
'makefile' (by default!), there is no reason why it would not work.
To look up a file, the kernel first does a case-sensitive lookup.
If that fails, it folds case and tries again. I think this would be
OK for POSIX even, because what you get is 'POSIX names and a great
number of aliases for each one'. If you never type the wrong filename
in by mistake you can not even tell that lookups can ignore case.

How about this?

case=posix # pure case sensitive
case=single # case preserving, 'NAME' and 'Name' can not coexist
case=multi # try poxix lookup, on failure fold case and retry lookup

Then add characterset restrictions:

chars=0123 # ASCII (first 4 groups of 32 chars)
chars=123567 # Printable ISO characters - Latin1, Latin2...
chars=01234567 # Anything goes. User can put ^S in filename :-)
chars=123456 # Printable 1 and 2 byte utf-8 characters
chars=123,nt # Only the printable ASCII characters WinNT allows!

Note that the last idea would be great for fileservers that serve
clients with foreign operating systems. Does anyone else want to
keep people from putting ^M^S or ^[30m into /tmp? The sysadm
should be able to prevent crazy (=dangerous) filenames.


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.051 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site