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 about 0.1% of the system's memory.
Depending on how big the final list is, this may or may not matter for performance.