The sort command can keep chronological order without using ram
How? I haven't found that option.
The command
sort only takes roughly 50% of your available RAM.
If you are running out of memory using
sort on a large file, most likely there isn't enough space on your hard drive.
What
sort does, when the file is larger than your available RAM, is that it creates temporary files on the hard drive which are then
merge-sorted at the end.
So the overall capacity needed is the sizes of the file times 3 (if you keep the original one) or 2 (if you overwrite the original file).
I might have just misunderstood the problem, might want to elaborate the actual issue?