ARTICLE - Fixing UNIX/Linux filenames

Ben Scott dragonhawk at gmail.com
Fri Nov 1 17:08:40 EDT 2013


On Thu, Oct 31, 2013 at 9:15 PM, Joshua Judson Rosen
<rozzin at geekspace.com> wrote:
>     ... perfectly useful on other operating systems but make Windows
>     choke, like all of |\?*<":>+[]/$ and words like "nul", "aux", "com",
>     "con", "prn"....

  You can't put / in a Unix file name, either.

> Sounded like more than a fair trade to me....

  I actually use spaces more than I use most of those (in file names).

  But, certainly, I don't recommend putting shell metacharacters (of
which space is one) in filenames.  I just don't think it should be
enforced by the filesystem layer.

> (seriously?
> I can't put all of my auxiliary files into a directory named "aux"?
> Not *anywhere* in the filesystem?).

  Yup, AUX: is the PS/2 mouse port, and the colon is optional after a
device name.  Another great design from MSFT.  :-p

> Then the "you can't have two files with the same name even
> if they're in different directories" thing really just... yow.

  I've never actually encountered that, in any version of Office or
Windows.  Or even any version of MS-DOS (other than 1.0 (which I've
never actually used, but it didn't have subdirectories)).  (Which is
not to say that some Microsoft product somewhere doesn't have that
problem.  Sounds like something they'd do.)

> So, what would have happened if I put a file named "clock$" into
> the repository somewhere that it would have been checked out
> by a Windows user?

  Hmmm, just tried, CLOCK$ doesn't seem to do anything anymore.  But
yah, back when it did, that prolly would have caused trouble.  I don't
think it would crash the system, but it might well scramble the
system's idea of the date and time.

> Or "lpt", even--if I put something like
> "this is what you get in trade for being able to use spaces
> in your filenames" into a file named "lpt1" or "prn", would it
> have printed on the Windows users' printers every time they
> did a "cvs up"?

  I think that might work, assuming they had a locally-attached
printer, or had redirected the port to a spool queue.

>     http://www.symantec.com/security_response/attacksignatures/detail.jsp?asid=21171

  Hyperlinks to file:///dev/urandom used to be a popular way to crash
Netscape.  I don't know if they've put in a check for that now.

-- Ben


More information about the gnhlug-discuss mailing list