Kernel Hacks & Weird Filenames

Leslie Mikesell les at chinet.UUCP
Mon May 2 14:31:05 AEST 1988


In article <575 at minya.UUCP> jc at minya.UUCP (John Chambers) writes:
>| it is pretty silly to allow non-printable characters in a filename.
>Silly, perhaps, but also sometimes necessary.

Not this time..
>...
>There was also a download command.  You typed something like
>	DL <command>
>and the <command> would be sent out the other port to the computer,
>....
>The fun thing with the DL command was that, before sending the
><command>, it sent a ^X (CTRL-X) character.  So if you typed the
>above 'cat' command, what Unix saw was:
>	^Xcat foo.obj
>
>Ignore the silliness of this strange behavior; we just had to live
>with it.

Given that the ASCII definition for control-X is CAN (as in cancel-line)
the purpose of the character was most likely to erase any garbage that
might have previously appeared on the port.  It is unusual to have such
a character forced into a stream, but in this contex it is not unreasonable
or entirely silly.  If your .profile | .login contained "stty kill '^x'
(as mine does), the CAN would have served its (probably) intended purpose.

>How we handled it was very straightforward.  We had a
>download shell script whose name was "^X".  We could then just
>type
>	DL  foo.obj
>and the script would be downloaded.  (Note the TWO spaces; you can
>probably imagine how often we typed only one :-).
>

Confusing device controls with filenames does not sound straighforward
to me.
>Without the ability to include a ^X in the filename, we would have
>had to write a special program to read the input and strip out the
>garbage character.  Not a big deal, perhaps, but then, every little
>barrier put in your way just makes the job harder.

But suppose that the job was passed to someone who uses CAN for its
defined purpose.  How long will it take him to figure out the the
^X file exists and how to invoke it?

Even if you don't want to let the tty drivers do their job, it is not all
that difficult to deal with an unwanted character.  If the error message
doesn't bother you or you can send stderr to /dev/null, you could type
DL ;cat foo.obj (no harder to remember than 2 spaces).  Or, just
execute:
tr -d '\030' |sh

>The world has lots of systems that can't handle simple things like
>filenames with weird characters.  One of Unix's strengths is that
>it generally doesn't impose silly restrictions.  Let's keep it that
>way.

As long as people are more interested in magic than in standards, it
will stay that way, and it will require a wizard to manipulate it.
Perhaps ASCII is a bit too provincial a standard.  What else is there?

  Les Mikesell



More information about the Comp.unix.wizards mailing list