by jmclnx · 1y ago · 0 comments
I take it to mean they want the system to know file_9.txt is less then file_10.txt.
I never saw that happen in any OS, so I do not know what he is referring to. Maybe whatever that old system was, it sorted by create time as opposed to file name.
So, the author can try and create "aisort" that will look at all file names and add leading zeros to the file numeric portion, sort, then remove the zeros added. That will probably as slow as s***t and use gobs pf memory, depending on the number of files.
So my original comment kind of stands but in a opposite way.
I have never see file_9.txt sorted before file_10.txt, I just tested it on OpenBSD and I got this, which I have always seen:
$ ls|sort
file_1.txt
file_10.txt
file_12.txt
file_2.txt
file_20.txt
file_3.txt
file_9.txt
The polar opposite, actually.