In Midnight Commander, files beginning with dot (hidden files) are sorted first and this make browsing in home directory quite difficult.

Is there a character that I can use that would be sorted before the dot?

Note: I know that I can hide the hidden files with Alt+..

migrated from stackoverflow.com Apr 8 '12 at 22:39

This question came from our site for professional and enthusiast programmers.


Midnight Commander just sort non alphabetic characters as they are ordered in the ASCII standard.
Just have a look at http://www.asciitable.com/ and pick any character before the dot (number 46 decimal).

As you see... the choice is narrow. Depending on the operating system you use, some characters are not usable. For Windows and Linux, you can just use a space, but this can be very missleading. And you'll need to use quotes around each such filenames when using the command line.

  • I like using the bang. The hyphen gives interesting problems, though. – Eroen Apr 17 '12 at 22:40

Take a look at ISO 8859/1. That said, you may prefer to use a UTF8 locale, which will ignore the dots: export LANG=en_US.UTF-8 (substitute your locale information as appropriate).


In fact there are two answers: you can use $ and - (removed characters that are not accepted by major filesystems).

Second: it is impossible in mc because mc will always display the dot first.

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.