• Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to stdin)

    From Marcel Mueller@21:1/5 to All on Sun Sep 1 11:44:16 2024
    Am 31.08.24 um 07:57 schrieb Kenny McCormack:
    2) Spaces in filenames are pretty much a necessity from the end-user
    POV (but see below). Yes, it makes things hard for us on the admin
    side of the game. I have always thought that the right answer is
    to have both - a short name that is usable for the admin side of
    the game and a long label that the user can work with. There are
    two solutions of this nature that I like:
    a) The "Extend a name" idea. Where you have short names at the
    filesystem level, but then have a database linked to that
    that allows the user to think that long, descriptive
    filenames are supported.

    A long long time ago, there was a DOS product called
    "Extend a name" that did this. Also, 4DOS (and later
    versions) does this.

    OS/2 also had the "display file name" approach for invalid file names.

    b) The way VFAT does it (and NTFS emulates) - where, for any
    file with a long name, there is an 8.3 filename (usually
    with weird characters in the filename) as well, and either
    filename is usable by programs. This is one place where I
    think Windows really gets it right (and Unix could learn
    from it).


    In fact both variants caused at least as much problems as they solved.

    First of all the relation between the two file names is usually lost, if
    a system that is not aware of them is used to move or copy a file.

    Secondly the raw file names in the backend can cause significant false positives with wildcard matching. E.g. when you delete *2.txt it is
    likely that a bunch of mangled file names match too.

    Last but not least sometimes the display file name is used to translate
    system folder names into the users language. Besides the false positive
    problem this makes it difficult to find the raw name for the user.
    (Of course, translated system folders like "Programme" or
    "Arbeitsoberfläche" caused other problems.)

    At the end I always disabled the two file mane approach wherever
    possible. (NTFS, Samba ...)
    If an old OS is not aware of accessing certain file names, it should not
    be used for this kind of data.


    Marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to John Ames on Tue Sep 10 06:51:53 2024
    On 03.09.2024 20:39, John Ames wrote:
    [...]
    Also, who says that filenames should not, as a rule, contain spaces?

    Technically, filenames may even contain ASCII control characters.
    Is it wise to use them?

    Semantically I'd interpret the term "file name" (and its original
    intention) as something different from, erm.., a "file novel".
    (I don't want to write "novels" to work with them [in non-GUIs].
    I want to spot differences easily, not have to parse the name.)

    A file [content] "description" is different from a file "name".
    (Note: above term "novel" was just a rhetoric accentuation of
    "description".)

    The descriptions that some folks stuff into a "file name" should
    IMO be part of a file's _meta-information_!
    (BTW, like the file's "extension" IMO would also belong there,
    like other formal or informal type information about the file.)

    It's a historic heritage what we have (strange, OS/FS-dependent,
    arbitrary, non-portable, error-prone, etc.). Tedious to discuss.

    Define your own standards... - and then live (or die) with them!

    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to John Ames on Tue Sep 3 15:47:23 2024
    John Ames <commodorejohn@gmail.com> writes:
    On Sat, 31 Aug 2024 08:37:01 -0000 (UTC)
    Muttley@dastardlyhq.com wrote:

    On Sat, 31 Aug 2024 05:57:12 -0000 (UTC)
    gazelle@shell.xmission.com (Kenny McCormack) gabbled:
    2) Spaces in filenames are pretty much a necessity from the
    end-user

    No they're not.

    WhoNeedsSpacesWhenYouCanJustCapitalizeEveryWordAsAVisualSignifierAmIRight >or-alternatively-make-liberal-use-of-dashes >or_use_underscores_like_some_deranged_freak

    Very readable and not at *all* weird or clunky!


    Perhaps Dennis had it right with a 14-character maximum filename :-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenny McCormack@21:1/5 to commodorejohn@gmail.com on Tue Sep 3 16:10:04 2024
    In article <20240903084440.0000663d@gmail.com>,
    John Ames <commodorejohn@gmail.com> wrote:
    On Sat, 31 Aug 2024 08:37:01 -0000 (UTC)
    Muttley@dastardlyhq.com wrote:

    On Sat, 31 Aug 2024 05:57:12 -0000 (UTC)
    gazelle@shell.xmission.com (Kenny McCormack) gabbled:
    2) Spaces in filenames are pretty much a necessity from the
    end-user

    No they're not.

    WhoNeedsSpacesWhenYouCanJustCapitalizeEveryWordAsAVisualSignifierAmIRight >or-alternatively-make-liberal-use-of-dashes >or_use_underscores_like_some_deranged_freak

    Very readable and not at *all* weird or clunky!


    I love this post.

    Yeah, you got it exactly. Note that users really hate underscores. They
    hate them as much as (or more than) we, the admins, love them. So, your comment about "deranged freak" is spot on.


    --
    Elect a clown, expect a circus.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lew Pitcher@21:1/5 to Scott Lurndal on Tue Sep 3 15:54:58 2024
    On Tue, 03 Sep 2024 15:47:23 +0000, Scott Lurndal wrote:

    John Ames <commodorejohn@gmail.com> writes:
    On Sat, 31 Aug 2024 08:37:01 -0000 (UTC)
    Muttley@dastardlyhq.com wrote:

    On Sat, 31 Aug 2024 05:57:12 -0000 (UTC)
    gazelle@shell.xmission.com (Kenny McCormack) gabbled:
    2) Spaces in filenames are pretty much a necessity from the
    end-user

    No they're not.

    WhoNeedsSpacesWhenYouCanJustCapitalizeEveryWordAsAVisualSignifierAmIRight >>or-alternatively-make-liberal-use-of-dashes >>or_use_underscores_like_some_deranged_freak

    Very readable and not at *all* weird or clunky!


    Perhaps Dennis had it right with a 14-character maximum filename :-)

    Only because space was tight on those early disk drives, and they
    only allocated 16 bytes for each directory entry (2 bytes inode#,
    14 bytes filename).

    :-)


    --
    Lew Pitcher
    "In Skills We Trust"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to John Ames on Tue Sep 3 17:37:21 2024
    On 2024-09-03, John Ames <commodorejohn@gmail.com> wrote:
    On Sat, 31 Aug 2024 08:37:01 -0000 (UTC)
    Muttley@dastardlyhq.com wrote:

    On Sat, 31 Aug 2024 05:57:12 -0000 (UTC)
    gazelle@shell.xmission.com (Kenny McCormack) gabbled:
    2) Spaces in filenames are pretty much a necessity from the
    end-user

    No they're not.

    WhoNeedsSpacesWhenYouCanJustCapitalizeEveryWordAsAVisualSignifierAmIRight or-alternatively-make-liberal-use-of-dashes or_use_underscores_like_some_deranged_freak

    This is a strawman argument; filenamews should not only not have spaces,
    but should be reasonably short. (No, not 8.3 short; that's not
    "reasonably" and therefore another strawman.)

    If we use spaces in your examples, the readability improves, but if you
    have a directory of just half a dozen such names, you've got a paragraph
    to read.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to John Ames on Tue Sep 3 20:11:28 2024
    On 2024-09-03, John Ames <commodorejohn@gmail.com> wrote:
    On Tue, 3 Sep 2024 17:37:21 -0000 (UTC)
    Kaz Kylheku <643-408-1753@kylheku.com> wrote:

    On 2024-09-03, John Ames <commodorejohn@gmail.com> wrote:
    On Sat, 31 Aug 2024 08:37:01 -0000 (UTC)
    Muttley@dastardlyhq.com wrote:

    On Sat, 31 Aug 2024 05:57:12 -0000 (UTC)
    gazelle@shell.xmission.com (Kenny McCormack) gabbled:
    2) Spaces in filenames are pretty much a necessity from the
    end-user

    No they're not.

    WhoNeedsSpacesWhenYouCanJustCapitalizeEveryWordAsAVisualSignifierAmIRight >> > or-alternatively-make-liberal-use-of-dashes
    or_use_underscores_like_some_deranged_freak

    This is a strawman argument; filenamews should not only not have
    spaces, but should be reasonably short. (No, not 8.3 short; that's not
    "reasonably" and therefore another strawman.)

    If we use spaces in your examples, the readability improves, but if
    you have a directory of just half a dozen such names, you've got a
    paragraph to read.

    I'm unclear on how that qualifies as a straw-man argument...?

    Because it is based on a strawman interpretation of the "no spaces"
    rule. That strawman interpretation is that there are no other rules
    used in combination with the "no spaces" rule, and thus that any
    ridiculous name is fine, just as long as it doesn't contain spaces.

    And so, look how unreadable is this 100 character name in CamelCase!
    Q.E.D. no spaces is a bad recommendation!

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to John Ames on Tue Sep 3 20:34:37 2024
    John Ames <commodorejohn@gmail.com> writes:
    On Tue, 3 Sep 2024 20:11:28 -0000 (UTC)
    Kaz Kylheku <643-408-1753@kylheku.com> wrote:

    Because it is based on a strawman interpretation of the "no spaces"
    rule. That strawman interpretation is that there are no other rules
    used in combination with the "no spaces" rule, and thus that any
    ridiculous name is fine, just as long as it doesn't contain spaces.

    And so, look how unreadable is this 100 character name in CamelCase!
    Q.E.D. no spaces is a bad recommendation!

    Well, there were no other factors *presented* alongside the blanket
    statement that spaces in filenames are unnecessary, so it would appear
    on the face of it to be an accurate assessment of the claim being made,
    which wasn't in a post of yours to begin with.

    And I'd still like to know who died and made whom king where filenames
    and spaces therein are concrned.


    For people who exclusively use GUIs, spaces in a field are not a problem.

    For people who work from the command line, spaces suck and are completely unnecessary and even a PITA and moreover, a potential security issue.

    I've not found a need for whitespace in a filesystem over the last 45 years
    of interactive computer usage. YMMV.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Scott Lurndal on Tue Sep 3 21:52:21 2024
    On Tue, 03 Sep 2024 20:34:37 GMT, Scott Lurndal wrote:

    For people who work from the command line, spaces suck and are
    completely unnecessary and even a PITA and moreover, a potential
    security issue.

    I work heavily from the command line. I like having spaces in file/
    directory names, and I regularly use them.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenny McCormack@21:1/5 to Muttley@dastardlyhq.com on Sat Aug 31 05:57:12 2024
    In article <ubg8a8$2t20l$1@dont-email.me>, <Muttley@dastardlyhq.com> wrote: >On Tue, 15 Aug 2023 16:12:19 -0000 (UTC)
    kalevi@kolttonen.fi (Kalevi Kolttonen) wrote:
    Kenny McCormack <gazelle@shell.xmission.com> wrote:
    But do they know that???

    "They" probably don't know it. But let's face it,
    nobody really wants to create a file having '-'
    filename on purpose. The filename is not descriptive
    at all, it would be just an insane choice for anything
    useful.

    I used to think the same thing about spaces in filenames. Then along came >Windows.


    (I happened to be re-reading this 1 year old thread, so thought I'd add a
    post to it)

    Two comments about spaces in filenames (and Windows vs. Unix):

    1) Windows is actually quite a bit more restrictive about characters in
    filenames than Unix. Which is a good thing. I've always thought
    the "anything other than NUL and /" in Unix was a bad thing and
    encouraged all manner of bad/malicious outcomes. Yet, there are
    people (and I use the term loosely) who think otherwise.

    2) Spaces in filenames are pretty much a necessity from the end-user
    POV (but see below). Yes, it makes things hard for us on the admin
    side of the game. I have always thought that the right answer is
    to have both - a short name that is usable for the admin side of
    the game and a long label that the user can work with. There are
    two solutions of this nature that I like:
    a) The "Extend a name" idea. Where you have short names at the
    filesystem level, but then have a database linked to that
    that allows the user to think that long, descriptive
    filenames are supported.

    A long long time ago, there was a DOS product called
    "Extend a name" that did this. Also, 4DOS (and later
    versions) does this.
    b) The way VFAT does it (and NTFS emulates) - where, for any
    file with a long name, there is an 8.3 filename (usually
    with weird characters in the filename) as well, and either
    filename is usable by programs. This is one place where I
    think Windows really gets it right (and Unix could learn
    from it).

    --
    He continues to assert that 2 plus 2 equals 4, despite being repeatedly
    told otherwise.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@dastardlyhq.com@21:1/5 to All on Sat Aug 31 08:37:01 2024
    On Sat, 31 Aug 2024 05:57:12 -0000 (UTC)
    gazelle@shell.xmission.com (Kenny McCormack) gabbled:
    2) Spaces in filenames are pretty much a necessity from the end-user

    No they're not.

    b) The way VFAT does it (and NTFS emulates) - where, for any
    file with a long name, there is an 8.3 filename (usually
    with weird characters in the filename) as well, and either
    filename is usable by programs. This is one place where I
    think Windows really gets it right (and Unix could learn
    from it).

    No, just no. The windows "solution" is a hideous hack only required for backwards compatability.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)