ARTICLE - Fixing UNIX/Linux filenames

Joshua Judson Rosen rozzin at geekspace.com
Thu Oct 31 21:15:22 EDT 2013


Ben Scott <dragonhawk at gmail.com> writes:
>
> On Thu, Oct 31, 2013 at 5:12 PM, Tom Buskey <tom at buskey.name> wrote:
> > Each can inflict horrors on the other OSen (name a file prn: in Unix for
> > your windows users)
>
>   An old prank was to get an MS-DOS user to issue the command:
>
>         TYPE CLOCK$
>
>   Which has roughly the same effect as
>
>        cat /dev/urandom
>
> on Linux.

I remember adding a check into a CVS repository, years ago,
to prevent files with spaces in their names from being added.
I got questions about it, and a couple of complaints....

I think I may have also responded to a `whyyyy do we have this stupid
rule about no spaces in filenames!' complaint with something like:

    I'll make you a deal: you give up one character of marginal utility
    (spaces, which you can replace with underscores or hyphens--like
    most people have been doing for years anyway), and the rest of us
    will give up  all of the dozen or so characters and words that
    are perfectly useful on other operating systems but make Windows
    choke, like all of |\?*<":>+[]/$ and words like "nul", "aux", "com",
    "con", "prn".... We'll also give up the difference between upper and
    lower case (because Windows can't handle that) and the ability to
    have two files with similar names anywhere in the repository, even
    in different directories (because MS Office and maybe some other MS
    tools can't handle *that*).

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

(Though, I actually wasn't that much of a jerk... most of the time...)

I think I had actually run into the issue of Windows disallowing
files named "nul" or "aux" at some point before that (seriously?
I can't put all of my auxiliary files into a directory named "aux"?
Not *anywhere* in the filesystem?). Then the "you can't have two files
with the same name even if they're in different directories" thing
really just... yow.

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? 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"?

This is cute:

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


-- 
"'tis an ill wind that blows no minds."


More information about the gnhlug-discuss mailing list