reverse¶
Output lines in reverse order.
Synopsis¶
Description¶
Output the lines of each file in reverse order (last line first, first line last). Similar to the tac command.
Examples¶
Reverse a file:
Reverse from stdin:
Reverse multiple files:
Sample Output¶
Input:
Output:
Use Cases¶
- Reading log files from newest to oldest
- Reversing command history
- Processing files from bottom to top