Ubuntu – How to set view preferences to sorted by reverse date modified

nautilus

I'd like to permanently set Nautilus's view preferences to show files sorted in reverse by date modified (newest first).

Similar questions have been asked before:

  1. How can I sort files in Nautilus by modified date?
  2. Can I view my files sorted by date?

However, they don't address making the preference permanent. Nautilus's preferences allow you to set sort by date modified (oldest first), but not reverse date modified (newest first).

Does anyone have suggestions on setting sorted by reverse date modified as default?

Best Answer

  • There's an additional parameter default-sort-in-reverse-order that doesn't appear to be accessible from the in-application preferences menu, but can be set in the dconf database - I think this will do you want.

    There is a GUI dconf-editor that allows you to modify such hidden settings - it's not installed by default but available by installing the dconf-tools package. Alternatively you can set it from the command line using gsettings

    $ gsettings set org.gnome.nautilus.preferences default-sort-in-reverse-order true
    

    If the dconf-tools package is installed, there is an equivalent dconf command line

    $ dconf write /org/gnome/nautilus/preferences/default-sort-in-reverse-order
    


    You can revert the change any time with

    $ gsettings reset org.gnome.nautilus.preferences default-sort-in-reverse-order
    

    or

    $ dconf reset /org/gnome/nautilus/preferences/default-sort-in-reverse-order
    

    Note that it applies to whatever the default sort order is, so for example if you change back to sort-by-name that will be reversed as well - there doesn't seem to be a way to specify the sort direction individually.