13

What I describe here is not about a problem with my Nautilus. (it is the default behavour)

I understand why Nautilus sorts the Name-column (ascending) so that "6 cats" occuring before "10 dogs"... Its collation sequence is treating a group of numeric-digits as a single number-value and not as individual characters.

That's fine... I can see some value in it, but personally I find it to be confusing,

And I have no idea why Nautilus completely ignores many leading non-alpha-numeric characters.. ie.!@$%^_:"- etc. as typed via as standard US keyboard..
By "ignore", I mean "---two camels" sorts to be immediately above "two camels", as if the "---" didn't exist... (strange !?).

How can I change the default collating sequence?...

gconf-editor /apps/nautilus/list_view shows some sort options, but does not offer a choice of collation option....
I hope there is an way to do this (otherwise Windows Explorer is one-up on this issue :( Windows allows you to choose the conventional collation sequence (via the registry)

1
  • 2
    I agree that ignoring the non-alphanumeric characters is annoying; e.g. I used to abuse them so that my temporary folders were always at the top... ;-)
    – JanC
    Nov 2, 2010 at 21:41

4 Answers 4

4

This answer is a workaround.
I've put this information forward because it seems that Nautilus just can't sort in the manner I prefer / want / need.

PCMan File Manager has a similar look and feel to Nautilus, yet it sorts the detaill view in a "by the column" fashion...

It sorts with most of the "special" characters to the top, and a few to the very bottom.. It is case insensitive, and is very close to what I was looking for (..."approximate ASCII"? followed by the remaining normally-sequenced Unicode Codpoint values/characters)..

It is available in Synaptic Package Manager under the name: pcmanfm

1
  • In Ubuntu 20.04 with Files 3.36.3, pcmanfm v. 1.3.1 is not as good as described here, but is still better than nautilus and is a usable workaround. You need to disable/uncheck View > Sort Files > Ignore Name Case. This obviously also does a case-sensitive sort, but does respect the ASCII ordering.
    – mivk
    Jan 1, 2021 at 15:56
3

The sorting of Nautilus follows the default collating of the locale. This means you have to override the collating of your locale.

To get the sorting like you described, add the following line to ~/.gnomerc (create if it doesn't exist and mark it executable): export LC_COLLATE=POSIX. One downside is that capital letters will sort ahead of lower case letters.

1
  • Joris, I want to first mention a mistake on my part. The ALPHA chars were sorting case-insensitive all along (I've ammended the question)... I applied POSIX as you suggested, but numbers and symbols are still sorting according to the "mysterious" heuristics I mentioned... I've rebooted, and even tried ="C" (didn't work)... I found an Arch-Linux forum page on this issue; lots of too-ing and fro-ing, but they couldn't resolve it... Maybe this behaviour is just hard-coded into the source.
    – Peter.O
    Nov 3, 2010 at 17:40
0

Another workaround:

in Krusader (version 2.2.0-beta1),

  • go to Settings > Configure Krusader...
  • Panel > View
  • and choose Sort method: Character code.

Files with the same prefix are grouped.

0

If you just want to put certain files or folders at the top, you can still use your non-alpha-numeric character but it needs also a "."

_.file.doc

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .