Public bug reported:

Since upgrading to 26.04.1 (from 24.04.5), I have a problem with the
command

ls --group-directories-first -lart

The files are sorted incorrectly

michael@phi:~/Test $ ls -lart | tail -7
-rw-rw-r--  1 michael michael    0 Sep 18 15:51 file154
-rw-rw-r--  1 michael michael    0 Sep 21 10:17 file109
-rw-rw-r--  1 michael michael    0 Sep 21 10:17 file107
-rw-rw-r--  1 michael michael    0 Sep 21 10:17 file108
-rw-rw-r--  1 michael michael    0 Sep 21 17:07 file138
drwxrwxr-x  2 michael michael 4096 Sep 21 18:02 .
drwxr-x--- 60 michael michael 4096 Sep 21 18:06 ..


michael@phi:~/Test $ ls --group-directories-first -lart | tail -7
-rw-rw-r--  1 michael michael    0 Sep 18 15:51 file154
-rw-rw-r--  1 michael michael    0 Sep 21 10:17 file109
-rw-rw-r--  1 michael michael    0 Sep 21 10:17 file107
-rw-rw-r--  1 michael michael    0 Sep 21 10:17 file108
-rw-rw-r--  1 michael michael    0 Sep 21 17:07 file138
-rw-rw-r--  1 michael michael    0 Dec 22  2024 file112
-rw-rw-r--  1 michael michael    0 Aug 28 11:36 file141

In the second listing, the filestamps are out of order. This does not
happen under 24.04.5 or any other distro I tested it on.

This happens in some directories and not in others. I cannot pin down
when it is triggered, but it is usually in directories with more than a
dozen or so files.

I attach a very simple file that creates the file structure that
recreates this result (it is simply a series of touch commands that
creates files and filestamps).

** Affects: coreutils (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: coreutils group-directories-first ls

** Attachment added: "A simple script that creates file with specific 
timestamps to recreate the problem described. Run in an empty directory only."
   
https://bugs.launchpad.net/bugs/2167860/+attachment/6001513/+files/recreate_files.sh

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2167860

Title:
  Problem with ls --group-directories-first

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/2167860/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to