[SOLVED] Nemo's sort by name underscoreFoldername not on top?!?
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
[SOLVED] Nemo's sort by name underscoreFoldername not on top?!?
I have lots of folder structures with folders beginning with one or more underscores! In m$ DOS/Windows that works flawless. And by doing so you can categorize your folders and sort by name.
1 underscore A-Z
2 underscores A-Z
etc
In Linux that looks like an effin mess!! How can i solve that??? Nemo can't handle it..
m$ Linux I have 100's of folders like this organized this way with the underscore and now i pull my hair out to find something!?
1 underscore A-Z
2 underscores A-Z
etc
In Linux that looks like an effin mess!! How can i solve that??? Nemo can't handle it..
m$ Linux I have 100's of folders like this organized this way with the underscore and now i pull my hair out to find something!?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Nemo's sort by name underscoreFoldername not on top?!?
Windows does not define what is "right". Sorting in Nemo is influenced by localisation, specifically the LC_COLLATE environment variable, but there isn't in fact a locale that specifies anything quite as ridiculous as sorting underscores first; when unlocalised, LC_COLLATE=C, the _ sorts exactly where it should, i.e., between uppercase and lowercase: http://www.asciitable.com. LC_COLLATE=WINDOWSWEENIE no one has as of yet implemented.
... which is not to say by the way that a file-manager such as KDE's Dolphin cannot adhere to your peculiar wishes, but nautilus/nemo is for now a Linux file manager, not a Windows one.
... which is not to say by the way that a file-manager such as KDE's Dolphin cannot adhere to your peculiar wishes, but nautilus/nemo is for now a Linux file manager, not a Windows one.
Re: Nemo's sort by name underscoreFoldername not on top?!?
What has that to do with it? Were did i mention that? Or are you just sour Linux didn't think of that first?
"Lissen kaarfully Rane, i wiel tell dies oonly wans!"
The fact is that i have a lot of folders archived this way when i worked on a windows box and now on a linux box it is a mess! I don't like a mess and i don't want to rename them all, so i asked for a fix in Linux! What i didn't ask for was a rant about your mental fittie with windows!
Well, not everybody is meant to see the brilliance in everything!rane wrote:Sorting in Nemo is influenced by localisation, specifically the LC_COLLATE environment variable, but there isn't in fact a locale that specifies anything quite as ridiculous as sorting underscores first;
I tried LC_COLLATE=LINUXLOOSER but after a reboot my beautifull desktop was gone and came into a crappy terminal!rane wrote: when unlocalised, LC_COLLATE=C, the _ sorts exactly where it should, i.e., between uppercase and lowercase: http://www.asciitable.com. LC_COLLATE=WINDOWSWEENIE no one has as of yet implemented.
If that were the case i would have dumped m$ years ago!!rane wrote:... which is not to say by the way that a file-manager such as KDE's Dolphin cannot adhere to your peculiar wishes, but nautilus/nemo is for now a Linux file manager, not a Windows one.
Oh and next time you get out of your bed, try your other leg first!
But thanx anyway for pointing me into the right direction (that must have hurt! )
Re: Nemo's sort by name underscoreFoldername not on top?!?
Hi RamonK,
Don't get this wrong - using special characters in folder/file names is poor practice that could potentially lead to unforeseeable and undesirable effects/issues. You would be better off and safer devising a numbering scheme to achieve your specific purpose i.e. use zeros instead of underscores.
Edit: Alright an underscore is not a special character in Linux but still, stick with alphanumeric naming and you won't ever have to depend on collating sequences.
Cheers.
Don't get this wrong - using special characters in folder/file names is poor practice that could potentially lead to unforeseeable and undesirable effects/issues. You would be better off and safer devising a numbering scheme to achieve your specific purpose i.e. use zeros instead of underscores.
Edit: Alright an underscore is not a special character in Linux but still, stick with alphanumeric naming and you won't ever have to depend on collating sequences.
Cheers.
Re: Nemo's sort by name underscoreFoldername not on top?!?
At the beginning of times, this archive once started with the name 'Tape1'! Because that's what you did those days when you made a backup! You sat down, carefully selected your preciouse files and copied them to your tapedrive! (yes i'm old) And through time that backup grew bigger and bigger! So there came a time i had to purchase another one,'Tape2', eventually a 'Tape3' and a 'Tape4'. Untill the day came and harddrives got bigger and cheaper, so you just put an extra hdd in your system and copied all your stuff to that drive. Then Tape2, Tape3 and 4 were copied into Tape1 and that kept growing! In that time i had my own way of categorise my files and folders.. none, 1, 2 or 3 underscores. It may not be the best way, it may not be the prittiest way, but i did it myyyyy waaayyyyy!
In other words, i am used to it, i can dream my way of categorize my stuff, it is almost 30 years old and it has NEVER EVER gave me any error in any kind of way!! (untill Linux came onto my path) And if Linux has a problem with underscores, then i find that kind of strange, because underscores are very common used in filenames! But this 'windowsweenie' is not here to discuss who's OS has the biggest p#nis, i came here for a solution! And no, renaming my system is no solution. For me making the step to Linux is time consuming enough!
In other words, i am used to it, i can dream my way of categorize my stuff, it is almost 30 years old and it has NEVER EVER gave me any error in any kind of way!! (untill Linux came onto my path) And if Linux has a problem with underscores, then i find that kind of strange, because underscores are very common used in filenames! But this 'windowsweenie' is not here to discuss who's OS has the biggest p#nis, i came here for a solution! And no, renaming my system is no solution. For me making the step to Linux is time consuming enough!
Re: Nemo's sort by name underscoreFoldername not on top?!?
Why not? I'm sure, renaming is a breeze and what would it matter if you are looking at zeros instead of underscores as long as sorting is correct? Did you get out of your bed on the wrong foot today, which is why you can't be flexed about it?
Cheers
Re: Nemo's sort by name underscoreFoldername not on top?!?
For once i think zero's are ugly before a name.. underscores are nice and you almost can't see them!
30 years of habit got nothing to do with feet, i like my way! And this system is here to serve ME, not the other way around!
So in short, nothing wrong with my archive system, only linux refuses to cooperate with it!
ONLY for that i'm searching for a solution!
And just when i thought linux is un-endly flexible i hit the first wall! (it's users! )
30 years of habit got nothing to do with feet, i like my way! And this system is here to serve ME, not the other way around!
So in short, nothing wrong with my archive system, only linux refuses to cooperate with it!
ONLY for that i'm searching for a solution!
And just when i thought linux is un-endly flexible i hit the first wall! (it's users! )
Re: Nemo's sort by name underscoreFoldername not on top?!?
Hi RamonK,
I must say, what I posted above is in fact not a solution and also, you do use special characters in the names of the files. a single quotes is a special character in Linux. Maybe it works somehow in your Windows setup and perhaps it could be setup the same way in Linux but what I now noticed from your post above, is, all these are in fact the backup folders.
Naming them that way is inadequate. I'm not sure how you know which is which and from what date? Perhaps, you like your way best, but dates would be more up to it e.g. 2019090201 - the last 2 digits denoting the first, the second, etc backup during a particular date if there were more than one.
Edit: And the descending/ascending sorting order would be impeccable. The fact that you can get it your way in Windows is a lucky coincidence, only you can't rely on coincidence when dealing with software/machine sorting. So, using underscores was a mistake from the very start, IMO.
Cheers.
I must say, what I posted above is in fact not a solution and also, you do use special characters in the names of the files. a single quotes is a special character in Linux. Maybe it works somehow in your Windows setup and perhaps it could be setup the same way in Linux but what I now noticed from your post above, is, all these are in fact the backup folders.
Naming them that way is inadequate. I'm not sure how you know which is which and from what date? Perhaps, you like your way best, but dates would be more up to it e.g. 2019090201 - the last 2 digits denoting the first, the second, etc backup during a particular date if there were more than one.
Edit: And the descending/ascending sorting order would be impeccable. The fact that you can get it your way in Windows is a lucky coincidence, only you can't rely on coincidence when dealing with software/machine sorting. So, using underscores was a mistake from the very start, IMO.
Cheers.
Re: Nemo's sort by name underscoreFoldername not on top?!?
But Linux is flexible. As mentioned above, non-GNOME-based file manager like e.g. Dolphin will do what you want and sort like you're used to from Windows (or mostly, Windows actually ignores a leading hyphen while sorting, just not an underscore). The choice is yours.
Last edited by gm10 on Mon Sep 02, 2019 7:51 am, edited 3 times in total.
Re: Nemo's sort by name underscoreFoldername not on top?!?
Hi gm,
Not necessarily... Let's say he "accidentally" changes code page settings in Windows, all his "neat" sorting could go amiss, as well. Apart from that, who names backups folders "___AAA, __BBSHOULDBEBEFORE___AA", anyways? I don't think this is to be taken for serious, it's just nitpicking...
Last edited by ColdBootII on Mon Sep 02, 2019 7:52 am, edited 1 time in total.
Re: Nemo's sort by name underscoreFoldername not on top?!?
Leading underscore or exclamation point are very standard ways on Windows of sorting folders to the top. Leading numbers is more of a Linux thing (and much uglier). I guess Nemo can now pin folders to the top though.ColdBootII wrote: ⤴Mon Sep 02, 2019 7:39 am Apart from that, who names backups folders "___AAA, __BB", anyways?
Last edited by gm10 on Mon Sep 02, 2019 7:57 am, edited 1 time in total.
Re: Nemo's sort by name underscoreFoldername not on top?!?
^Yes, I know that, but would you name any of your backup folders "__BBISBEFORE____A"?
Re: Nemo's sort by name underscoreFoldername not on top?!?
Obviously those are example folder names shown to explain how they should sort under his method.
Based on what rene said, can't he just make his own LC_COLLATE, sorting underscores above letters? Or does that have undesirable effects across the os?
Based on what rene said, can't he just make his own LC_COLLATE, sorting underscores above letters? Or does that have undesirable effects across the os?
Re: Nemo's sort by name underscoreFoldername not on top?!?
Besides affecting the sorting of some other applications? No, it's safe, doing it myself both for underscore and exclamation mark. Consistency is king. Here's an example on how to do it: http://svmiller.com/blog/2019/07/notes- ... bettersort, although personally I just edited the source file directly. From my postinst script:polarvortex wrote: ⤴Mon Sep 02, 2019 9:02 am Based on what rene said, can't he just make his own LC_COLLATE, sorting underscores above letters? Or does that have undesirable effects across the os?
Code: Select all
sudo sed -i "s/<U0021> IGNORE;/<U0021> <RES-1>;/" -e "s/<U005F> IGNORE;/<U005F> <RES-1>;/" /usr/share/i18n/locales/iso14651_t1_common
sudo locale-gen
Re: Nemo's sort by name underscoreFoldername not on top?!?
Yes, examples not bearing any semblance with the actual naming used.polarvortex wrote: ⤴Mon Sep 02, 2019 9:02 am Obviously those are example folder names shown to explain how they should sort under his method.
which make more sense particularly if there is sufficient number of padding zeros as in Tape00001, Tape00002... now that can't be disordered irrespective of OS/collating/code-page combination.Tape2, Tape3 and 4 were copied into Tape1
Re: Nemo's sort by name underscoreFoldername not on top?!?
How old are you? Did you really not understand that ___AAA was an example??? Wow, i have to lower my standards then..ColdBootII wrote: ⤴Mon Sep 02, 2019 9:50 amYes, examples not bearing any semblance with the actual naming used.polarvortex wrote: ⤴Mon Sep 02, 2019 9:02 am Obviously those are example folder names shown to explain how they should sort under his method.which make more sense particularly if there is sufficient number of padding zeros as in Tape00001, Tape00002... now that can't be disordered irrespective of OS/collating/code-page combination.Tape2, Tape3 and 4 were copied into Tape1
And NO the folders are NOT named 'Tape1' but
Tape1
without the single quotes.. Were double facepalms are not enough!!
@gm10 thanx, i will look into that!
Re: Nemo's sort by name underscoreFoldername not on top?!?
Old enough not to use memes where and when that is inappropriate.
Yes, "___AAA" (quotes because I'm referring to what you've typed here so, you see, I also have to lower my standards) is an example you wouldn't use anyway. Why bring it up then? But, If you're really using "Tape1, Tape2" etc. as a naming convention for your backups without zero padding, you'll end up with Tape10, if you have that many, showing before Tape2 even on Windows doing it "youuuur waaaay".
That (and that meme) tells much of your age and experience.
Re: Nemo's sort by name underscoreFoldername not on top?!?
Not to get involved in your little war but that flame attempt crashed and burned. Both Windows Explorer and many/most Linux file managers will sort Tape10 after Tape9. Try again?ColdBootII wrote: ⤴Mon Sep 02, 2019 11:08 am If you're really using "Tape1, Tape2" etc. as a naming convention for your backups without zero padding, you'll end up with Tape10, if you have that many, showing before Tape2 even on Windows doing it "youuuur waaaay".
Re: Nemo's sort by name underscoreFoldername not on top?!?
14? 15 maybe...? You really have nothing better to do? Aren't there new levels of your hello kitty game yet?ColdBootII wrote: ⤴Mon Sep 02, 2019 11:08 am Old enough not to use memes where and when that is inappropriate.
Re: Nemo's sort by name underscoreFoldername not on top?!?
Gentlefolks, can we keep the emotional outbursts to a minimum on all sides please, and focus on a more constructive attitude?
I'd appreciate it.
I'd appreciate it.
If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!