Question: How Do I Reverse Order in Unix?
Contents to Sort in Reverse Order Pass the -R Option to Sort. This Will Sort in Reverse Order and Write the Result to Standard Output. Using the Same List of...
To sort in reverse order pass the -r option to sort . This will sort in reverse order and write the result to standard output. Using the same list of metal bands from the previous example this file can be sorted in reverse order with the -r option.
How do I reverse the order of files in Linux?
Listing files in reverse name order
To reverse the listing of files by name, add the -r (reverse) option. This will be like turning the normal listing upside down.
Must Read
How do you sort in reverse order?
Sort in Descending order
Setting reverse = True sorts the list in the descending order. Alternately for sorted() , you can use the following code.