Sort -k 2
To display the files sorted in ascending order, we use the command ‘sort’. Suppose we have the following file and we want to sort out the data. linux:~ # more sort.txtBarrack ObamaGeorge BushBill ClintonRonald ReaganJimmy Carterlinux:~ # To sort the file we use the following command: