Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jan 012010
 

How to reverse print a file?

Answer:

Normally, you can print a file to standard out by using

cat test.txt

It will show something like:

a
b
c

However, if you want to start from the last line, you can use tac (actually it is reverse of the cat command)

tac test.txt

It will give:

c
b
a