So I have an enormously large file (around 10GB) and need to sort it, just like in using 'sort' utility, but kindof more effectively.
Problem is, that I don't have memory, CPU power, time, nor free swapping space to power the whole sort.
The good thing is that file is already partially ordered (I can say that every line's distance from its final position is less than some value N). This kindof reminds me the classical computer-class example of using heapsort with heap of size N for this purpose.
Question: Is there some unix tool that already does that effectively, or do I need to code one myself?