This is a known feature ??#!! (known since 2006), but to many (myself included), it is more of a bug; but it isn't a bug, because it works as intended, ie. it sorts numbers as integers, not as text strings... To be kind to this issue, it is technically not a bug, but just a case of: "limited sorting options".
Here is bugzilla page on this point: Bug 355152 - Sorting by name doesn't work with digits..
A quote from that page: "This is just wrong. Any user intent is completely nuked by a strange sorting algorithm" ... my sentiments, exactly.
This default (only?) sort algorithm is handy for some people (I assume), but it doesn't suit me, so I've learnt to live with it by simply adding leading 0's, as a matter of course...
.. Here is another well-intended (human??) but odd-ball sorting feature which could benefit from some options: Nautilus: Copy file to same directory gives a whacky sort sequence
..and I won't even mention how the sorting algorithm completely ignores leading non-alphanumeric characters (like they don't exist).... oops, I just mentioned it :)
nautilus
is significantly grafted into the desktop, and offers such features as auto mounting, and file/folder notes, so I put up with this sorting anomaly; I just name my files in accordance with this algorithm, ie zero-padded numbers, and no leading non-alphanumeric characters...
You can get back the full date by recompiling nautilus:
sudo apt-get build-dep nautilus
sudo apt-get install quilt
export QUILT_PATCHES=debian/patches
apt-get source nautilus
cd nautilus*
quilt new 999_full_dates.patch
quilt edit libnautilus-private/nautilus-column-utilities.c
Change line 77 from
"attribute", "date_modified",
to
"attribute", "date_modified_full",
Rebuild and install modified package:
quilt refresh
fakeroot dpkg-buildpackage
cd ..
killall nautilus
sudo dpkg -i nautilus_*.deb
nautilus &
As always, you have to perform these steps every time there is an update for nautilus in Ubuntu.
Now, a full analysis of the problem:
The actual patch which caused this change is this one.
The function nautilus_file_get_date_as_string
gains an extra gboolean parameter "compact" - when true the abbreviated date is returned.
This function is never called directly - it is accessed through the wrapper function nautilus_file_get_string_attribute_q
. This function takes attribute parameters like "date_modified". To accommodate the new signature of nautilus_file_get_date_as_string
a new attribute is added "date_modified_full
". After this change, any code in nautilus which uses the file date string will get the abbreviated date.
Finally, the file properties dialog is updated to use "date_modified_full" attribute.
So in order to have nautilus display the full date in list view, it is only necessary to change one line of code: in libnautilus-private/nautilus-column-utilities.c, line 77 from "date_modified" to "date_modified_full".
A slightly more useful patch could add a new column type which would show the full date, making this an optional feature, and only add 10 lines of code.
Best Answer
It is simple. From the
Menu Bar
, click View -> Arrange Items -> By Modification Date :)Alternatively, depending on the view of your File Manager, you can simply do one of these:
From Icon/Compact View
Right-click on an unoccupied area of your File Manager, select Arrange Items -> By Modification Date
From List View
Simply click Date Modified in the bar on top of file list.
To choose between ascending and descending, you can click on the Date Modified in the bar once again, or use Arrange Items -> Reversed Order from View menu or right-click menu.