sort -u <filename>
would be faster than all that piping sort -u <filename>
would be faster than all that pipingIt may also help to use compression with the temporary files (something like "--compress-program lzop"), but I've never tried that.
Did you really think sort(1) just bails if you pipe it more data than can be contained in memory?