Two kinds of reverse
People mean two different things by reverse order, so this page offers both.
- Sort Z to A: orders lines in reverse alphabetical order. Banana, Apple, Cherry becomes Cherry, Banana, Apple.
- Reverse current order: flips the lines exactly as they are, without sorting. The last line becomes the first.
When to flip
Flipping is the right choice for logs and histories that are written oldest first when you want the newest at the top, for numbered steps you want to count down, and for any list where the existing order matters but you need it backwards.
When to sort Z to A
Use Z to A when you want a reverse alphabetical list, such as names from the end of the alphabet first. Case is ignored by default, and you can tick options to remove duplicates or empty lines.
Example
The lines first entry, second entry, third entry and fourth entry flipped become fourth entry, third entry, second entry, first entry.
For A to Z use sort lines alphabetically. For numbers or lengths, use the main sort lines tool. The guide shows the same on the command line.