Re:Ask HN: Sorting massive text files?
by jemfinch on Saturday August 14, 2010 @12:59PM
(#1603590)
Compared to the IO costs, the computational difference must be inconsequential.
[ Parent
| on HN ]
Right, but sort is apparently clever enough to do a disk-backed mergesort on a file (according to timr's comment), but it doesn't get a chance to recognize that you're sorting a file if you just pipe in the data.
Why did you get modded up? You're wrong. Sort will write temporary files to /tmp if you exceed its in-memory sort threshold.
Did you really think sort(1) just bails if you pipe it more data than can be contained in memory?
You're correct. Perhaps the up-voters were thinking it must just be better to report the piping. Which it is, but that doesn't make the comment valid.
Er, you're right. I don't know what I was thinking.