[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21890: "ls -l" strange alphabetical order
From: |
Pádraig Brady |
Subject: |
bug#21890: "ls -l" strange alphabetical order |
Date: |
Thu, 12 Nov 2015 17:56:49 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
tag 21890 notabug
close 21890
stop
On 12/11/15 14:15, Andreas Papadopoulos wrote:
> I am experiencing a strange bug when executing "ls -l" on my machine running
> Xubuntu 14.04.3, Terminal Emulator 0.6.3 and ls --version 8.21.
>
> As you can see in the png attachment after running "ls -l" the files
> "kati.xml", "kati2.xml", "kati3.xml" are wrongly sorted. I assume the correct
> order is "kati.xml", "kati2.xml", "kati3.xml" and not the one displayed in
> the picture.
>
> Thank you in advance
This is due to '.' being ignored in your locale:
$ LC_ALL=en_US ltrace -e strcoll ls -l
ls->strcoll("kati.xml", "kati3.xml") = 30
ls->strcoll("kati2.xml", "kati3.xml") = -1
$ LC_ALL=C ltrace -e strcoll ls -l
ls->strcoll("kati.xml", "kati3.xml") = -5
ls->strcoll("kati2.xml", "kati.xml") = 4
ls->strcoll("kati2.xml", "kati3.xml") = -1
You might want to consider alias ls='ls -v'
thanks,
Pádraig