Kernel Hacks & Weird Filenames

John Chambers jc at minya.UUCP
Sat May 7 12:46:24 AEST 1988


> >You may be part of the "English-only" crowd, but there are lots of us
> >who aren't, and we badly need those extra character codes.  The fact
> >that you can't type them on your silly ANSI terminal is of no concern
> >to us.
> >
> Do your devices not require device control characters (carriage-return,
> line-feed, form-feed, flow control, pad control, and the like?  Do you
> like having them in filenames?

Not particularly, but I like the alternatives even less.

One of the nice things about Unix is that I can explain to a novice 
that the kernel (i.e., open() and exec()) only know about '/' and
null, and ALL other characters are equally acceptable.  This is a
very simple rule, and eliminates any further questions.

"Ah, but why can't I type some names?" I hear you asking.  Well, 
that's simply not a Unix (i.e., kernel) question.  Again, it's
easy to explain to a novice.  A program (such as a shell) may
well implement any rules its author desires.  But since it's
outside the kernel, you don't have to live with rules you don't
like.  If you don't like a file's name, well, a trivial C program
can change it.

If the kernel imposed complicated rules on file names, none of
this would be true, and every programmer's job would be made that
much harder.  

One of Unix's virtues is that there are great simplicities like
this.  Let's try to keep it that way.  Our job is too complicated
as it is, without having to discover the funny naming rules that
each vendor's release has imposed on us.

[Now if there were something I could do about that file whose
name, due to a disk error, has a null or a '/' in its name. ;-]

-- 
John Chambers <{adelie,ima,maynard,mit-eddie}!minya!{jc,root}> (617/484-6393)

You can't make a turtle come out.
	-- Malvina Reynolds



More information about the Comp.unix.wizards mailing list