sort -r file.txt

Category: Text Processing

sort -r file.txt

Sort lines in reverse order

Sorts lines in reverse alphabetical order (Z to A). -r means 'reverse'.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.