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

Liste des GroupesRevenir à c misc 
Sujet : Re: Rationale for aligning data on even bytes in a Unix shell file?
De : vallor (at) *nospam* cultnix.org (vallor)
Groupes : comp.misc
Date : 02. May 2025, 04:03:18
Autres entêtes
Message-ID : <m7iqvmFfauiU1@mid.individual.net>
References : 1 2 3 4
User-Agent : Pan/0.162 (Hmm4; 7b109588; Linux-6.14.4)
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..."

Date Sujet#  Auteur
1 May 25 * Re: Rationale for aligning data on even bytes in a Unix shell file?4vallor
2 May 25 `* Re: Rationale for aligning data on even bytes in a Unix shell file?3Scott Dorsey
2 May 25  +- Re: Rationale for aligning data on even bytes in a Unix shell file?1vallor
3 May 25  `- Re: Rationale for aligning data on even bytes in a Unix shell file?1Eli the Bearded

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal