Skip to the content.

Read Command Output In Reverse Order

We can use tac to read file(s) or stdout in reverse order.

tac - concatenate and print files in reverse

Example

$ echo -e "Hello\nWorld" | tac
World
Hello

Source: StackOverFlow