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..."
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)