For all .dat files in one go, start with "cat blk* |" instead
I often use
sort on large data sets, and can recommend to change the sort command to sort
-u -S60% (assuming you have at least 60% of your RAM available). This largely reduces the need to write /tmp-files. Without this,
sort uses only about 0.1% of the system's memory.
Depending on how big the final list is, this may or may not matter for performance.
Nice addition. Yes! Do use the -S flag. (On my VirtualBox with Ubuntu, the sort behavior is, strangely, the exact opposite; without a flag, it uses 100% RAM, which is not cool either. 60% is a sweet spot indeed.)