🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #220

Re: Changing collation order with 'ls'

#220
From: Janis Papanagnou
Date: Wed, 14 Oct 2026 14:46
35 lines
2938 bytes
On 2026-10-14 13:42, Christian Weisgerber wrote:
> On 2026-10-14, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
> 
>> I looked into the mundane appearing question to change the sorting
>> order of the 'ls' command. I wanted to have non-'alnum' characters
>> come first. The two obvious ways - looking into the (many dozens!)
>> of options supported by 'ls', and setting LC_COLLATE (or LC_ALL) -
>> strangely, didn't work or show anything appropriate.
> 
> That would depend on the operating system's ls(1) implementation,
> but FreeBSD's does honor LC_COLLATE:
> [...]
> The sysadmin would have to create a locale with your particular
> collation order.

Thanks. My OS is a Linux. The "sysadmin" (sort of) is in practice
me, disregarding that some distro system managers define these OS
things (and regularly replace any changes I do in "their" part of
the file system with system updates). So defining my own "personal
locale file" is not exactly what I was looking for.[*]

I interpret your post that you see no other way, specifically not
any way to obtain such a function "on the shell command-line level"
(as I had written in my OP to be seeking)?

Janis

[*] See also this old StackExchange comment about that suggestion:
  "To make the underscore appear before uppercase, you would
   need to define your own locale settings. This is possible,
   but awkward to use, because at least under Linux, the standard
   library only looks for locale definitions in /usr/lib/locale —
   there's no ~/.locale or environment variable where you could
   put your en_tom setting."
Technical Details
Message-ID: <11ao4ku$4o6m$5@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11anebm$4o6l$4@dont-email.me> <slrn11cuqkl.dq6.naddy@lorvorc.mips.inka.de>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.unix.shell
Subject: Re: Changing collation order with 'ls'
Date: Wed, 14 Oct 2026 16:46:54 +0200
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <11ao4ku$4o6m$5@dont-email.me>
References: <11anebm$4o6l$4@dont-email.me>
 <slrn11cuqkl.dq6.naddy@lorvorc.mips.inka.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 14 Oct 2026 14:46:55 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="155862"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19HpGiUl/3mNGXKNKyWqwgo"; posting-host="359384faa59b45467a45ee36976f8a6e"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:DZ1RaQ5IAOfYmgiCJQriHLdJ/Gw= sha256:0vjlAqsobjjkS3mP3DbVd0E167NsjbC+L373lVDGw/8=
	sha1:JG5L1ea+Svm4bYufq9NE3fUD9qQ= sha256:ham+sxmFbbcpOT4lFZJfiniEsf7iU2BAJTcvd/PIfOc=
In-Reply-To: <slrn11cuqkl.dq6.naddy@lorvorc.mips.inka.de>
Content-Language: en-US