 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

16th July 2011, 02:58 AM
|
|
Registered User
|
|
Join Date: Jan 2011
Posts: 274

|
|
|
nautilus not sorting data properly
Can someone tell me why nautilus is sorting my files in such a weird way? I would think it would sort numerically by the first number, then second number, etc.
|

16th July 2011, 09:11 AM
|
|
Registered User
|
|
Join Date: Jul 2011
Location: Berlin, Germany
Posts: 113

|
|
|
Re: nautilus not sorting data properly
May be they are sorted by Date?
|

16th July 2011, 09:41 AM
|
|
Registered User
|
|
Join Date: Jun 2011
Location: Hungary
Posts: 56

|
|
|
Re: nautilus not sorting data properly
Quote:
Originally Posted by michaaa62
May be they are sorted by Date?
|
Nope, the arrow is in the Name column, facing down.
|

17th July 2011, 08:14 AM
|
|
Registered User
|
|
Join Date: Jan 2011
Posts: 274

|
|
|
Re: nautilus not sorting data properly
Quote:
Originally Posted by michaaa62
May be they are sorted by Date?
|
Take a look at the name column and you will see an arrow pointing down.
|

17th July 2011, 11:32 AM
|
 |
Registered User
|
|
Join Date: Aug 2005
Location: Ann Arbor
Age: 45
Posts: 3,907

|
|
|
Re: nautilus not sorting data properly
the list looks just fine
Numbers THEN letters
1b
4c
4x
05( space)
54
the list is fine
|

17th July 2011, 11:46 AM
|
|
Registered User
|
|
Join Date: Jan 2011
Posts: 274

|
|
|
Re: nautilus not sorting data properly
Quote:
Originally Posted by JohnVV
the list looks just fine
Numbers THEN letters
1b
4c
4x
05( space)
54
the list is fine
|
And what about this?
74
74
74
10
26
26
26
48
The 74's should be last and the 26's should be after 1b.
|

17th July 2011, 09:34 PM
|
 |
Registered User
|
|
Join Date: Aug 2005
Location: Ann Arbor
Age: 45
Posts: 3,907

|
|
|
Re: nautilus not sorting data properly
your missing the point of this i posted Numbers THEN letters
that first 74 is
74F -- a CAP F caps COME FIRST!!!
74h -- a lowercase h
the list is fine
gnome just has an odd sort
numbers
numbers & blank space
CAP letters
lowercase letters
|

18th July 2011, 12:08 AM
|
 |
Administrator
|
|
Join Date: Aug 2009
Posts: 6,612

|
|
|
Re: nautilus not sorting data properly
what is so odd about that?
collating sequence would be
numbers
(some special characters are mixed in all over the place)
capital letters
lower case letters
for example: (values in hex)
blank space = ascii 20
1 = ascii 31
A = ascii 41
a = ascii 61
so sorting ascending order, you would get:
blank+numerals
numerals+blank
numerals
uppercase letters
lower case letters
Nothing odd to Gnome's sort. It's the standard ascii collating sequence.
In COKEDUDE's example above, is it possible that there is actually a non-printable character before the 74 in the list? (or you are selecting descending order instead of ascending.)
|

18th July 2011, 12:30 AM
|
|
Registered User
|
|
Join Date: Oct 2006
Posts: 4,752

|
|
|
Re: nautilus not sorting data properly
Nautilus is probably just confused as to why anyone would adopt such a naming scheme. 
---------- Post added at 07:30 PM ---------- Previous post was at 07:28 PM ----------
Also, it might be helpful to post a screenshot from a file manager that handles this properly according to you. Just for comparison.
|

18th July 2011, 01:45 AM
|
|
Registered User
|
|
Join Date: Jan 2011
Posts: 274

|
|
|
Re: nautilus not sorting data properly
Quote:
Originally Posted by JohnVV
your missing the point of this i posted Numbers THEN letters
|
I know. Its not sorting the numbers sequentially. I was expect it to sort the numbers sequentially.
Quote:
Originally Posted by Dies
Nautilus is probably just confused as to why anyone would adopt such a naming scheme. 
---------- Post added at 07:30 PM ---------- Previous post was at 07:28 PM ----------
Also, it might be helpful to post a screenshot from a file manager that handles this properly according to you. Just for comparison.
|
Good call  . It sorts the first character by 0-9, then moves onto a-z on the first character, then moves to the second character in the same process.
Code:
ls -l /home/bob/Downloads/total 14805668
-rw-rw-r--. 1 bob bob 59594 Jul 14 12:46 05 prime detector_examples.pdf
-rw-rw-r--. 1 bob bob 7662 Jul 7 11:49 100px.png
-rw-rw-r--. 1 bob bob 602295 Jul 7 09:24 1b30b_4317572-original.jpg
-rw-rw-r--. 1 bob bob 131076 Jul 15 21:37 265518_2149209525527_1104990044_32555706_1870191_o(1).jpg
-rw-rw-r--. 1 bob bob 131076 Jul 15 21:32 265518_2149209525527_1104990044_32555706_1870191_o.jpg
-rw-rw-r--. 1 bob bob 55230 Jul 8 20:57 269832_10150319072431224_570991223_9696399_5921799_n.jpg
-rw-rw-r--. 1 bob bob 81657 Jul 14 11:04 488883_DS.pdf
-rw-rw-r--. 1 bob bob 24453431 Jul 8 22:11 4cc3bb1f75278.flv
-rw-rw-r--. 1 bob bob 96888 Jul 14 14:18 4x1_multiplexer.png
-rw-rw-r--. 1 bob bob 213097 Jul 14 11:09 54AC191.pdf
-rw-rw-r--. 1 bob bob 117571 Jul 14 11:02 74F193.pdf
-rw-rw-r--. 1 bob bob 91549 Jul 14 11:11 74hc193.pdf
-rw-rw-r--. 1 bob bob 75827 Jul 14 11:01 74LS191.pdf
-rw-rw-r--. 1 bob bob 4368 Jul 17 05:38 adobe-release-i386-1.0-1.noarch.rpm
|

18th July 2011, 02:25 AM
|
|
Registered User
|
|
Join Date: Oct 2006
Posts: 4,752

|
|
|
Re: nautilus not sorting data properly
Quote:
Originally Posted by COKEDUDE
Code:
ls -l /home/bob/Downloads/total 14805668
-rw-rw-r--. 1 bob bob 59594 Jul 14 12:46 05 prime detector_examples.pdf
-rw-rw-r--. 1 bob bob 7662 Jul 7 11:49 100px.png
-rw-rw-r--. 1 bob bob 602295 Jul 7 09:24 1b30b_4317572-original.jpg
-rw-rw-r--. 1 bob bob 131076 Jul 15 21:37 265518_2149209525527_1104990044_32555706_1870191_o(1).jpg
-rw-rw-r--. 1 bob bob 131076 Jul 15 21:32 265518_2149209525527_1104990044_32555706_1870191_o.jpg
-rw-rw-r--. 1 bob bob 55230 Jul 8 20:57 269832_10150319072431224_570991223_9696399_5921799_n.jpg
-rw-rw-r--. 1 bob bob 81657 Jul 14 11:04 488883_DS.pdf
-rw-rw-r--. 1 bob bob 24453431 Jul 8 22:11 4cc3bb1f75278.flv
-rw-rw-r--. 1 bob bob 96888 Jul 14 14:18 4x1_multiplexer.png
-rw-rw-r--. 1 bob bob 213097 Jul 14 11:09 54AC191.pdf
-rw-rw-r--. 1 bob bob 117571 Jul 14 11:02 74F193.pdf
-rw-rw-r--. 1 bob bob 91549 Jul 14 11:11 74hc193.pdf
-rw-rw-r--. 1 bob bob 75827 Jul 14 11:01 74LS191.pdf
-rw-rw-r--. 1 bob bob 4368 Jul 17 05:38 adobe-release-i386-1.0-1.noarch.rpm
|
Yeah, I think I prefer the way Nautilus (glib) does it over that.
For example, I would not like it at all if a graphical file manager sorted
265518_2149209525527_1104990044_32555706_1870191_o (1).jpg
before
265518_2149209525527_1104990044_32555706_1870191_o .jpg
Seems silly to me, but then I guess it comes down to personal preference, you can always file a bug against glib. Hopefully they won't listen though.
|

18th July 2011, 03:24 AM
|
|
Registered User
|
|
Join Date: Jan 2011
Posts: 274

|
|
|
Re: nautilus not sorting data properly
Quote:
Originally Posted by Dies
Yeah, I think I prefer the way Nautilus (glib) does it over that.
For example, I would not like it at all if a graphical file manager sorted
265518_2149209525527_1104990044_32555706_1870191_o (1).jpg
before
265518_2149209525527_1104990044_32555706_1870191_o .jpg
Seems silly to me, but then I guess it comes down to personal preference, you can always file a bug against glib. Hopefully they won't listen though. 
|
I really don't weather these 2 are before or after each other.
265518_2149209525527_1104990044_32555706_1870191_o (1).jpg
265518_2149209525527_1104990044_32555706_1870191_o .jpg
I care when this:
74LS191.pdf
coming before these 2
265518_2149209525527_1104990044_32555706_1870191_o (1).jpg
265518_2149209525527_1104990044_32555706_1870191_o .jpg
There is absolutely no reason that 74* should come before 26*. It makes absolutely no sense.
Is this what you mean when you say glib? Shouldn't the bug be filed with gnome?
http://developer.gnome.org/glib/
|

18th July 2011, 04:27 AM
|
|
Registered User
|
|
Join Date: Oct 2006
Posts: 4,752

|
|
|
Re: nautilus not sorting data properly
Quote:
Originally Posted by COKEDUDE
...
265518_2149209525527_1104990044_32555706_1870191_o (1).jpg
265518_2149209525527_1104990044_32555706_1870191_o .jpg
There is absolutely no reason that 74* should come before 26*. It makes absolutely no sense.
|
On the other hand, one could also argue that there is absolutely no reason to name a file this way.
265518_2149209525527_1104990044_32555706_1870191_o .jpg
It makes absolutely no sense.
Not trying to be a jerk or anything, just hoping you'll see that this example is a little contrived and unlikely to be taken seriously by any developer.
Quote:
Originally Posted by COKEDUDE
|
Pretty sure Nautilus is using g_utf8_collate_key_for_filename which is part of glib, but I could be wrong about that. And anyway it doesn't really matter if you file it against the wrong package, they'll triage it for you whenever they get to it.
|

18th July 2011, 05:50 PM
|
|
Official Gnome 3 Sales Rep. (and Adminstrator)
|
|
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,707

|
|
|
Re: nautilus not sorting data properly
Quote:
Originally Posted by COKEDUDE
I care when this:
74LS191.pdf
coming before these 2
265518_2149209525527_1104990044_32555706_1870191_o (1).jpg
265518_2149209525527_1104990044_32555706_1870191_o .jpg
There is absolutely no reason that 74* should come before 26*. It makes absolutely no sense.
|
265518 is a larger number than 74.
The collation considers a string of consecutive numerical characters as a whole number when sorting (so that file10.txt comes after file9.txt rather than after file1.txt for example).
With systematic file names this makes a lot of sense, but will make a confusing list when the file names are meaningless.
It might be possible to change this via the LC_COLLATE environment variable, but I'm not sure.
Gareth
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 22:58 (Tuesday, 21-05-2013)
|
|
 |
 |
 |
 |
|
|