lkml.org 
[lkml]   [1996]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: filenames
On Tue, 7 May 1996, Albert Cahalan wrote:

> > 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.
> >
(clip)
> >
> > 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.

You have to store the information, do twice the comparisons, and potentially
patch all sorts of programs to deal with minor issues of case. For example,
should "cat M*" show all programs which are "M*" and "m*" or just "M*".
Right now I can say "cat M* m*" or "cat [Mm]*", but I won't have a choice if
insensitivity is used and wildcards follow it. How about "rm q*"? What
about scripts that use wildcards? If I have a file "MonEy" and a file
"monEY" in a directory, and I type "cat MONEY" which one is output?

When I run an editor "vi monkey" and a file called "MonKey" will it edit the
existing file? If not, I have to be exact for some commands, ie editors,
and inexact for others. If it does edit the existing file, then how *do* I
create a file called "MonKey"? Do I type "vi tmp" then rename "tmp"? What
is the resulting name? I know this sounds arbitrary, but all of these
decisions affect existing software/scripts, etc. Many (most?) utilities
must be patched to deal with such situations.

Halfway measures (ie only implement it in interactive shells) make the
system inconsistent. A lot of programming is learned habit, so
inconsistencies only make for lots and lots of typos. If you type "rm
makefile" every time, you will not remember to use "Makefile" in a script.
On the other hand, you will break existing "very stable" scripts if you make
it work for non-interactive scripts.

This is a DWIM type enhancement.

>
> 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.
>
(clip)
>
> 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.

(opinion:) I think this is usually prompted by "I'm used to not having to
capitalize on my old OS." This is only a problem (IMHO) for the first few
weeks of using a new OS.

This is a mess of complexity (bloat bloat), and your specs here are only an
outline... I'm not saying this idea is something only a dummy would do...
Many big name (PC) OS's do it, but what is the technical advantage?


__kmb203@psu.edu_________________________Debian__1.1___Linux__1.3.97___
THE LESSER-KNOWN PROGRAMMING LANGUAGES #12: LITHP
This otherwise unremarkable language is distinguished by the absence of
an "S" in its character set; users must substitute "TH". LITHP is said
to be useful in protheththing lithtth.



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