Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 904323 - sys-apps/coreutils-9.1-r2: "ls" - not work reverse order while sorting (--reverse)
Summary: sys-apps/coreutils-9.1-r2: "ls" - not work reverse order while sorting (--rev...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-14 10:53 UTC by globus
Modified: 2023-04-15 03:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge.info (emerge.info.bz2,3.28 KB, application/x-bzip2)
2023-04-14 11:00 UTC, globus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description globus 2023-04-14 10:53:05 UTC
Hello!
Sorry my bad English.
The --reverse key does not work for ls, it works together with the -t key.

Reproducible: Always

Steps to Reproduce:
1.touch 1.test ; touch 2.test ; touch 3.test ; touch 4.test
2.ls -r
3.ls -rt
Actual Results:  
4.test  3.test  2.test  1.test

Expected Results:  
1.test  2.test  3.test  4.test
Comment 1 globus 2023-04-14 11:00:17 UTC
Created attachment 860097 [details]
emerge.info
Comment 2 Ionen Wolkens gentoo-dev 2023-04-14 14:01:55 UTC
I tried with same version but can't reproduce.

Maybe try running `ls --version` just to be sure it's not running a different ls?

Also, what filesystem is this on? (I don't think it should be related, but just in case)

For me:
    $ touch 1.test ; touch 2.test ; touch 3.test ; touch 4.test
    $ ls
    1.test  2.test  3.test  4.test
    $ ls -r
    4.test  3.test  2.test  1.test
    $ ls --version
    ls (GNU coreutils) 9.1
    Packaged by Gentoo (9.1-r2 (p0))
Comment 3 Ionen Wolkens gentoo-dev 2023-04-14 14:03:34 UTC
Also did you get this backward? The former is in reverse, so it's normal.

    Actual Results:  
    4.test  3.test  2.test  1.test

    Expected Results:  
    1.test  2.test  3.test  4.test
Comment 4 globus 2023-04-15 03:21:53 UTC
Sorry, I made a mistake. I didn't take into account that the key in aliases is -U. Without an alias, it worked as it should. I'm very, very sorry. The bug can be closed.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-15 03:22:19 UTC
No worries, thank you for coming back and explaining :)