• Re: Rationale for aligning data on even bytes in a Unix shell file?

    From vallor@vallor@cultnix.org to comp.lang.c,comp.misc on Thu May 1 00:57:42 2025
    From Newsgroup: comp.misc

    On Wed, 30 Apr 2025 23:56:40 -0000 (UTC), Lawrence D'Oliveiro
    <ldo@nz.invalid> wrote in <vuudbo$1ajpm$7@dont-email.me>:

    On Wed, 30 Apr 2025 12:38:53 -0000 (UTC), Muttley wrote:

    Its certainly not a scheme I'd use, but I've also seen Makefile and
    makefile in the same package build directory in the past.

    The GNU “make” command, specified without a filename, looks for “GNUmakefile”, then “Makefile”, then “makefile”. The man page <https://manpages.debian.org/make(1)> says:

    We recommend Makefile because it appears prominently near the
    beginning of a directory listing, right near other important files
    such as README.

    But is this still true for most people? I think the default sort
    settings these days no longer put all-caps names at the top.

    (Setting x-post and followups to comp.misc -- follow or ignore,
    it's up to you...)

    On Linux, try:

    LC_COLLATE=C ls -l

    ...and the capitalized filenames will float to the top.

    (Discovered by logging into my Panix shell and inspecting
    the behavior and settings there.)
    --
    -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
    OS: Linux 6.14.4 Release: Mint 22.1 Mem: 258G
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From kludge@kludge@panix.com (Scott Dorsey) to comp.misc on Thu May 1 20:30:08 2025
    From Newsgroup: comp.misc

    vallor <vallor@cultnix.org> wrote:
    On Linux, try:

    LC_COLLATE=C ls -l

    ...and the capitalized filenames will float to the top.

    (Discovered by logging into my Panix shell and inspecting
    the behavior and settings there.)

    Does it work on linux as well as on the Panix machines?
    --scott
    --
    "C'est un Nagra. C'est suisse, et tres, tres precis."
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From vallor@vallor@cultnix.org to comp.misc on Fri May 2 03:03:18 2025
    From Newsgroup: comp.misc

    On Thu, 1 May 2025 20:30:08 -0400 (EDT), kludge@panix.com (Scott Dorsey)
    wrote in <vv13mg$i2c$1@panix2.panix.com>:

    vallor <vallor@cultnix.org> wrote:
    On Linux, try:

    LC_COLLATE=C ls -l

    ...and the capitalized filenames will float to the top.

    (Discovered by logging into my Panix shell and inspecting the behavior
    and settings there.)

    Does it work on linux as well as on the Panix machines?
    --scott

    Yes.

    Here's what's up. When I run locale(1) on Linux Mint, I see:

    [...]
    LC_COLLATE="en_US.UTF-8"
    [...]

    So ordering is case-insensitive, apparently:

    $ ls -l
    total 28
    -rwxrwxr-x 1 vallor vallor 16016 Jan 10 2024 ckarray
    -rw-rw-r-- 1 vallor vallor 169 Jan 10 2024 ckarray.c
    -rw-rw-r-- 1 vallor vallor 24 May 1 19:59 Makefile
    -rw-rw-r-- 1 vallor vallor 63 Jan 10 2024 phrase.txt

    But setting it to "C", I get:

    $ LC_COLLATE=C ls -l
    total 28
    -rw-rw-r-- 1 vallor vallor 24 May 1 19:59 Makefile
    -rwxrwxr-x 1 vallor vallor 16016 Jan 10 2024 ckarray
    -rw-rw-r-- 1 vallor vallor 169 Jan 10 2024 ckarray.c
    -rw-rw-r-- 1 vallor vallor 63 Jan 10 2024 phrase.txt

    ...which is the case-sensitive sort order.
    --
    -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
    OS: Linux 6.14.4 Release: Mint 22.1 Mem: 258G
    "Time wounds all heels..."
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Eli the Bearded@*@eli.users.panix.com to comp.misc on Sat May 3 20:07:52 2025
    From Newsgroup: comp.misc

    In comp.misc, Scott Dorsey <kludge@panix.com> wrote:
    vallor <vallor@cultnix.org> wrote:
    LC_COLLATE=C ls -l
    (Discovered by logging into my Panix shell and inspecting
    the behavior and settings there.)

    A Panix convention.

    Does it work on linux as well as on the Panix machines?

    The glibc Linux boxen work with that. 'LC_COLLATE=C' seems to mean
    "tradional C behavior". I'm not sure how non-glibc Linux behaves
    (thinking of Alpine). I suspect those don't even need the variable.

    Elijah
    ------
    has been running with LC_COLLATE=C in ~/.profile for many years
    --- Synchronet 3.20c-Linux NewsLink 1.2