GNU bug report logs - #21890
"ls -l" strange alphabetical order

Previous Next

Package: coreutils;

Reported by: Andreas Papadopoulos <papandre92 <at> gmail.com>

Date: Thu, 12 Nov 2015 16:34:01 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21890 in the body.
You can then email your comments to 21890 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#21890; Package coreutils. (Thu, 12 Nov 2015 16:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Papadopoulos <papandre92 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Thu, 12 Nov 2015 16:34:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Papadopoulos <papandre92 <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: "ls -l" strange alphabetical order
Date: Thu, 12 Nov 2015 16:15:50 +0200
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]
[newimage.png (image/png, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#21890; Package coreutils. (Thu, 12 Nov 2015 17:57:01 GMT) Full text and rfc822 format available.

Message #8 received at 21890 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Andreas Papadopoulos <papandre92 <at> gmail.com>, 21890 <at> debbugs.gnu.org
Subject: Re: bug#21890: "ls -l" strange alphabetical order
Date: Thu, 12 Nov 2015 17:56:49 +0000
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




Added tag(s) notabug. Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 24 Oct 2018 21:18:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 21890 <at> debbugs.gnu.org and Andreas Papadopoulos <papandre92 <at> gmail.com> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 24 Oct 2018 21:18:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 22 Nov 2018 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 210 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.