sort is a Unix command to order data in file(s) in a sequence.
Full user manual of sort reading online
sort