Xfce Forum

Sub domains
 

You are not logged in.

#1 2026-03-11 00:44:19

emmemm11
Member
Registered: 2021-09-15
Posts: 12
LinuxFirefox 148.0

Thunar vs. 'ls' file sort order

If I have a given directory containing files:

Picture.jpg
Picture 2.jpg
Picture A.jpg

Thunar displays them as shown above, but "ls -l" shows them

$ ls -l
total 1376
-rw-r--r-- 1 xxxxxx xxxxxx 387896 Mar  9 20:40 'Picture 2.JPG'
-rw-r--r-- 1 xxxxxx xxxxxx 387896 Mar  9 20:40 'Picture A.JPG'
-rw-r--r-- 1 xxxxxx xxxxxx 630154 Mar  9 20:40  Picture.JPG
$

Midnight Commander displays them like "ls", but Double Commander (the file manager I use) displays like Thunar.

Where this messes me up is when I am sorting out pictures - I have a graphics viewer (ristretto or nomacs) in one window and Thunar in another. As each file gets displayed, in the file manager I go to the one top of the list and either delete or move it elsewhere. When one of these "Picture" and "Picture 1" combinations come up I end up deleting or moving the wrong file if I'm not watching carefully.

Is there some way to make them all agree? I personally think Thunar is correct - why would a longer file name sort before a shorter one? - but good luck getting "ls" to change its behavior. I really don't care too much who is correct, but would like consistency.

Offline

#2 2026-03-11 01:15:25

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,506
LinuxFirefox 148.0

Re: Thunar vs. 'ls' file sort order

If you are using at least thunar version 4.21.3, there was a "smart-sort" hidden setting added that:

If enabled, filenames are split into collatable substrings and e.g. numbers are compared separately in a numeric way instead of comparing them digit-by-digit. If disabled, plain ASCII is used.

Perhaps this might be helpful?

More information:


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.023 seconds, 7 queries executed - Memory usage: 518.99 KiB (Peak: 519.97 KiB) ]