this post was submitted on 27 May 2024
19 points (95.2% liked)

Linux

48181 readers
1163 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I'm in the process of switching my machines to Linux Mint from Windows and on my network drive I have a bunch of folders that are sorted with the help of preceding underscores (like this "__folder1" "___folder2")) so that folders appear in a specific order.

When my Mint machines access the drive they sort by the first letter skipping the underscores and I'd really like to have that functionality back rather than having to rename a bunch of folders to try to sort them again. (I'd like to avoid a preceding 'A' workaround if possible as there's a bunch of folders)

Any suggestions? A setting I'm missing (very likely) or something?

Edit: The more I look the more it looks like I'm going to have to make a custom locale to be able to get the sorting I want from the default Mint file manager.

you are viewing a single comment's thread
view the rest of the comments
[–] thingsiplay@beehaw.org 1 points 5 months ago* (last edited 5 months ago)

That's exactly what the last 2 comments from the previously linked issue thread is saying too. According to a comment from Stack Overflow, the LC_COLLATE=C environmental variable setting is dependent on the system locale, which will

This is likely caused by a difference in locale. In the en_US.UTF-8 locale, underscores (_) sort after letters and numbers, whereas in the POSIX C locale they sort after uppercase letters and numbers, but before lowercase letters.

-- https://stackoverflow.com/questions/1184268/unix-sort-treatment-of-underscore-character

So either way, this setting is wrong for your use case. And it shouldn't be set in .profile all applications by default as well, unless you know what you are doing. You can use this variable with specific applications only too. But as explained, this would not solve your issue anyway.