experchange > freebsd

Drew Lawson (11-24-18, 12:42 AM)
I've just upgraded some systems from 10.x (I think 10.3) to 11.2.
The process was mostly uneventful (see below), however I am finding
that the default sorting for ls(1) has changed.

Previously, and on my yet-to-upgrade 10.2 machine, ls(1) with no
options listed files in the historical lexicographical ordering --
Caps first.

To my knowledge, I do not have any locale or such specified.

Is there sonething I can set to say that I want the old ordering?

-=-=-=-

Foot shooting moment.

TL;DR: freebsd-update tells you what to do next. Read it.

The first upgrade appeared to be fine, but then all the ports were
screwed up, especialy perl. Lots of complaints about missing shared
libraries. Figured out my mistake during the 2nd system upgrade.

I did:
freebsd-update -r 11.2-RELEASE upgrade
freebsd-update install
shutdown -r now
[wait]
freebsd-update install

At this point I read the previously ignored message that old shared
libraries would be deleted and to update my ports (I build from
source) BEFORE the next reboot.

Port update still in progress, but without any errors about libelf.so.1
or libperl.so.something.
Bob Eager (11-24-18, 01:51 AM)
On Fri, 23 Nov 2018 22:42:11 +0000, Drew Lawson wrote:

> I've just upgraded some systems from 10.x (I think 10.3) to 11.2.
> The process was mostly uneventful (see below), however I am finding that
> the default sorting for ls(1) has changed.
> Previously, and on my yet-to-upgrade 10.2 machine, ls(1) with no options
> listed files in the historical lexicographical ordering -- Caps first.
> To my knowledge, I do not have any locale or such specified.
> Is there sonething I can set to say that I want the old ordering?


I am running 11.2-STABLE and I don't see that problem. Nothing has
changed. Caps first still.

It isn't some weird locale setting that's changed, is it?
Drew Lawson (11-24-18, 08:45 PM)
In article <g5ri3mFpa0nU23>
Bob Eager <news0073> writes:
>On Fri, 23 Nov 2018 22:42:11 +0000, Drew Lawson wrote:
>> I've just upgraded some systems from 10.x (I think 10.3) to 11.2.
>> The process was mostly uneventful (see below), however I am finding that
>> the default sorting for ls(1) has changed.

>I am running 11.2-STABLE and I don't see that problem. Nothing has
>changed. Caps first still.


Good to know the world still makes sense.

>It isn't some weird locale setting that's changed, is it?


Apparently it is. Comparing machines with the knowledge that this
isn't new behavior, I found that on the offending machine I had the
environment variable LANG set to en_US.UTF-8. Clearing that gave
me regular behavior.

The mystery now is where that came from. It isn't in any of my dot
files, and isn't in any of the /etc files.

Thanks for letting me know it isn't a code change.
ted (Ted Nolan (11-24-18, 09:11 PM)
In article <ptc68g$1sme$1>,
Drew Lawson <drew> wrote:
>In article <g5ri3mFpa0nU23>
> Bob Eager <news0073> writes:
>Good to know the world still makes sense.
>Apparently it is. Comparing machines with the knowledge that this
>isn't new behavior, I found that on the offending machine I had the
>environment variable LANG set to en_US.UTF-8. Clearing that gave
>me regular behavior.
>The mystery now is where that came from. It isn't in any of my dot
>files, and isn't in any of the /etc files.
>Thanks for letting me know it isn't a code change.


I finally had to go into en_US.UTF-8 recently because I was seeing
so much unicode text for various reasons. It works fine, but I *do*
miss the old sort order!
Winston (11-24-18, 09:21 PM)
On Fri, 23 Nov 2018 22:42:11 +0000, Drew Lawson wrote:
>>> I've just upgraded some systems from 10.x (I think 10.3) to 11.2.
>>> The process was mostly uneventful (see below), however I am finding
>>> that the default sorting for ls(1) has changed.


Bob Eager <news0073> replied:
>>I am running 11.2-STABLE and I don't see that problem. Nothing has
>>changed. Caps first still.


> Good to know the world still makes sense.


>>It isn't some weird locale setting that's changed, is it?


drew (Drew Lawson) writes:
> Apparently it is. Comparing machines with the knowledge that this
> isn't new behavior, I found that on the offending machine I had the
> environment variable LANG set to en_US.UTF-8. Clearing that gave
> me regular behavior.


It looks more likely that it's $LC_ALL. With $LANG undefined but
LC_ALL=en_US.ISO8859-1, I get the case-independent listing order,
but with LC_ALL undefined and LANG=C or your LANG=en_US.UTF-8, I get the
old case-dependent order.
-WBE
Christian Weisgerber (11-24-18, 09:42 PM)
On 2018-11-24, Ted Nolan <tednolan> <ted> wrote:

> I finally had to go into en_US.UTF-8 recently because I was seeing
> so much unicode text for various reasons. It works fine, but I *do*
> miss the old sort order!


If all you are concerned about is the displaying of UTF-8, use
LC_CTYPE instead of LANG.
Christian Weisgerber (11-24-18, 10:43 PM)
On 2018-11-24, Winston <wbe> wrote:

> It looks more likely that it's $LC_ALL. With $LANG undefined but
> LC_ALL=en_US.ISO8859-1, I get the case-independent listing order,
> but with LC_ALL undefined and LANG=C or your LANG=en_US.UTF-8, I get the
> old case-dependent order.


That doesn't make sense, since LC_ALL and LANG are the same thing,
only at different relative priorities. My testing concurs.

To exclude the influence of whatever you have in your environment,
you might want to use

$ env -i FOO=en_US.UTF-8 ls

to test the effect of each variable FOO individually.
Similar Threads