Unfortunately Nautilus developers decided a long time ago (back in 2006) that sorting by name should mean "natural sorting". In their interpretation this means that filenames containing both numbers and letters are devided into "chunks" (i.e. characters sequences containing only letters or only numbers) and numbers are sorted numerically.
Eg. the filenames "3000abc63.txt" and "10000bla786.txt" will be sorted like this:
- 3000abcd.txt
- 10000blabla.txt
The reason is simple: both filenames start with numbers, so Nautilus splits each into chunks.
The "3000abcd.txt" filename will become:
(maybe the extension is considered too, I'm not sure)
And "10000bla786.txt" will become this:
The "natural sorting" algorithm compares the two numbers first and since 3000 < 10000, "3000abcd.txt" will come before "10000bla786.txt" in the sorted file listing.
The real problem is that this is mandatory! You do not get to choose whether you want this sorting or not. There's only one way to sort by filenames in Nautilus and it's this one. What a pity.
Unfortunately this idea is spreading:
Mint's Nemo is based off Nautilus, but inherited the same stupid name sorting.
PCManFM works the same way.
There're
quite many Nautilus users who
hate this sorting method, but it seems that the fate of sorting files by name is final.
Comments
strange file soring by Nautilus
Re: strange file soring by Nautilus
ls
won't adopt this natural sorting algorithm anytime soon:ls
command is part of thecoreutils
package, meaning it's a lot more "core" than Nautilus.ls
behaves could/would have far reaching consequences ... scripts breaking, etc.