shell - How could the UNIX sort command sort a very large file? -
the unix sort
command can sort large file this:
sort large_file
how sort algorithm implemented?
how come not cause excessive consumption of memory?
the algorithmic details of unix sort command says unix sort uses external r-way merge sorting algorithm. link goes more details, in essence divides input smaller portions (that fit memory) , merges each portion @ end.
Comments
Post a Comment