I'd either create an index file of field -> file+line number and sort on that
Unfortunately it is not as easy as that. If you sort an index containing just the sorting keys and the offsets, you will need a last step where you combine the sorted index with the original file to create the final full sorted output file.
Doing this step straight ahead, just following the index and seeking into the original file to read every line, would be very, very, very inefficient. Roughly, (as estimated by BrowserUk) 165e6 records * 10ms per seek = 19 days!!!
A work around is to create the final file in several passes reading the original file sequentially and generating an slice in every pass... not so easy!