How to print all lines of a data file in reverse order
The command “tac” (reverse of cat command) which prints contents of a file in reverse order in terms of lines. It can also concatenate multiple files while printing in reverse order.
Sample data file:
[neo@techpulp ~]# cat data.txt line1: Mango line2: Apple line3: Banana line4: Papaya [neo@techpulp ~]#
Output of “tac” command on the same data file:
[neo@techpulp ~]# tac data.txt line4: Papaya line3: Banana line2: Apple line1: Mango [neo@techpulp ~]#

