other weird stuff... see pic folders starting with ! on Windows were on top. In Zorin in simple alphabetical order. ! ignored... I will check for fun on Lubuntu. Kin
Certain characters have a special meaning in Linux and are best avoided when used for filenames, even though they are legal. For example, spaces and exclamation marks. I guess the way Nautilus works is it simply ignores these characters when sorting files.
Thank you for explaining... on wind backups I have ! about in any folder structure... another little
inconvinience for solid habit.
booted Lubuntu... it works like a charm.
I selected Zorin as my MAIN
Windows replacement because read that it's the closest to Windows behaviour in Linux world... I found many little things that I have to compromise on.
Just bought 9th gen mini pc for a bargain price. So will go back to Windows.
On my gen6 wind11 couldnot be installed and W10 expires soon.
So I will put my old little monster for Linux and put in the garbage really dated laptops.
One thing that I surely liked is Brave... so I will use it on my Wind as a default browser...
But when M$ will make obsolete gen9 processors I will sure go for Linux as a main pc.
Changing sort order in nautilus that it not ignores non-alphanumeric characters:
I found some sites which describe that LC_COLLATE=C would help. But some are very old and the commands need perhaps to be adapted for ubuntu 22.
https://askubuntu.com/questions/281726/nautilus-sorting-by-filename-column-seems-insane
https://askubuntu.com/questions/239371/how-do-i-list-folders-with-underscores-first#243012
https://unix.stackexchange.com/questions/761400/how-exactly-does-nautilus-sort-files-by-name
I am not familar with this. Perhaps someone can help you more.
Perhaps it works when you set in
etc/default/locale
at line LC_COLLATE
LC_COLLATE=C
or perhaps better
LC_COLLATE=C.UTF-8
Alternatively you can use the service localectl. This commands should effect the same:
"sudo localectl set-locale
LC_COLLATE=C"
"sudo localectl set-locale
LC_COLLATE=C.UTF-8"
Make sure that there is no entry at LC_ALL as it overwrites all other settings.
Then reboot to apply the changes.
But I also found threads where is mentioned that this change doesn't effect nautilus and nautilus ignores these settings and is programmed specially. With other file managers as e.g. nemo there was said it works. Perhaps you need "LC_ALL=C nautilus" for nautilus that it works?
And changing this locales can cause problems in other programs and they are often not suitable for countries with specific characters. So I am not sure if it is worth to try.
The best would be to make a backup copy of this file before editing it. So you can easily go back.
Edit: I tried it in Linux Mint XFCE with file manager thunar and there it worked by adding LC_COLLATE=C to etc/default/locale (or to etc/locale.conf).
Now files with filenames that have ! at first position are the first in a folder.
In my language, German, this setting means that files containing umlauts such as Γ€, ΓΆ, ΓΌ or Γ are no longer sorted correctly alphabetically, so this setting is probably only suitable for languages such as English, which do not use special characters in the letters.
@community-moderators
Is it possible to create a own thread about "Change sorting order in file manager (to not ignoring non-alphanumeric characters)" and put posts no.6 - no.10 into there?
There is no information on this topic in this forum so far.
I'm interested in this topic because I don't find it logical that the sort order of files listed in the "list" command in terminal is apparently (as I've read in various threads) different from that in the GUI of file managers. This does not only affect Nautilus.
I can do that.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
