6

I'm using Ubuntu 20.04 LTS and I want to sort files in a file explorer by their extension. I found the possibility of using nemo and sort the files by the Detailed Type but this doesn't really work satisfactorily. I have e.g. some files from MATLAB with the ending .m but some are marked correctly marked as MATLAB file but some are marked as Objective-C source code but they are also plain MATLAB code. Is there any way to sort the files (and folders) reliably by their extension? I'm not tied to any file explorer so any recommendation is very welcome. The two most important features which must be supported are

  1. Sorting the files by their extension (highest priority)
  2. Showing the whole address in the address line (rather than only those 'blocks' starting at the home directory)

4 Answers 4

4

It sounds like you need to meet to DoubleCommander

It have:

  • Sorting the files by their extension (highest priority)
  • Showing the whole address in the address line (rather than only those 'blocks' starting at the home directory)

Sorted by files and whole address in the bar

Alternatively you can display the name with the extension and the extension column

Name column options

Also you can change the fonts in the config

Font options

You can add a hot key to edit the path or, from the first row, press F2.

Path line options Pressing F2

10
  • Same problem as for Krusader, is there no way to show the file extension directly after the file name AND sort by the extension? How to make the font in the address line bigger?
    – Steradiant
    Oct 27, 2020 at 7:21
  • 1
    @Steradiant You can add the name with the extension in the Name column and the extension in another. It is an option. That way you can sort by name and sort by extension and always see the name with the extension.
    – LeoLopez
    Oct 27, 2020 at 13:07
  • 1
    @Steradiant You can change the address line font in the configuration
    – LeoLopez
    Oct 27, 2020 at 13:16
  • thanks for the explanation, the Options are pretty overwhelming at the beginning. Just one more question, do you know if there is also an option that the address bar is always in 'text style' so that I don't always have to right click to enter it?
    – Steradiant
    Oct 27, 2020 at 13:24
  • So far I know, that option doesn't exist, but you can add a hotkey to quickly edit the path line or, from the first row, (the arrow with the dots) you can press F2
    – LeoLopez
    Oct 27, 2020 at 13:49
4
+50

I'm happily using Krusader for some time now. It should be able to do what you want, certainly allows sorting by extension.

enter image description here

4
  • 1
    Can you show a screenshot with it being sorted by extension? Also, can you show the whole address line instead of breadcrumbs?
    – bamm
    Oct 27, 2020 at 2:14
  • It seems like quite a pain to get it running as I want. The first thing is, that there are obviously some icons missing (I get red crosses). I've googled this but the solution does somehow not work. Furthermore, is there no way to show the file extension directly after the filename AND sort it by the extension?
    – Steradiant
    Oct 27, 2020 at 7:18
  • 1
    @Steradiant The icons might be an issue, I seem to be missing some as well, but it never bothered me much. Might have to do with the fact it is a KDE application and not well integrated into a Gnome environment. To still sort by extension when the "Ext" column is not displayed, you will have to add a button to a toolbar called "Sort by Extension".
    – Sebastian
    Oct 27, 2020 at 19:30
  • I found another problem with Krusader. If I mount a NTFS partition with read/write permissions, I still can't write files to this partition with Krusader. I don't get an error or something, it just doesn't work! Any idea what might be the problem?
    – Steradiant
    Dec 28, 2020 at 11:59
1

You mean like this? The blocks you mentioned are called "breadcrumbs" (I don't know why) but you can get rid of it by clicking on the button I encircled in red in the picture below, to the left of the word "Location".

enter image description here

4
  • Which file explorer is it? Can it sort by file extension (this is the more important feature for me).
    – Steradiant
    Oct 26, 2020 at 16:05
  • This is caja from Mate. It has "Arrange items by Type" but I don't know if this is what you are looking for. Linux follows the Freedesktop standard which identifies file type based on its content rather than by its extension. It is possible, however, to setup a particular extension to always be classified as a given type. You do this by defining the MimeType associated with that extension, but that's another topic.
    – bamm
    Oct 27, 2020 at 2:08
  • That's an interesting fact (that Linux identifies file type based on its content). But obviously this identification isn't really reliable. Do you probably know if there is any way to tell the developers to improve that?
    – Steradiant
    Oct 27, 2020 at 6:45
  • You are right that many times a file can get misidentified. The files are identified using both the extension and a so-called "magic number" which is simply a set of characters that must exist for it to be seen as that file type. For example: create a text file with no extension. Write some text and save it. Now put on top #!/bin/sh and you see that the icon changes to that of a shell script. Change it to html code and again it changes. But sometimes files can get misidentified, so in this case, maybe you should file bug reports. Bug reports are useful because it helps improve the system.
    – bamm
    Oct 27, 2020 at 8:51
1

On the command line it could be done with

ls --sort=extention

or

ls -1 --sort=extension
2
  • Thanks for the hint but I know feature. Nevertheless, I'm explicitly looking for a file explorer because I am way faster in navigating with a file explorer rather than the command line.
    – Steradiant
    Oct 26, 2020 at 16:02
  • Throw that into a yad file chooser dialog and you almost have what the OP wants, but it's not general purpose as a real file manager would be.
    – Joe
    Oct 29, 2020 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.