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.
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.
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)?
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 54:15:09 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
3 files (2,684K bytes) |
| Messages: | 285,458 |