How do I 'cat' a text file but start from the bottom instead of top

I have a very big text log file of about 37MB.
Using cat file | more I can view the file contents one page at a time.

The problem is that this always starts from the top - the old entries.
How can I make it start from the bottom where the newer entries are then move up page by page?

1 Answer

Try the tac command, which reverses the input, line by line.

Alternatively, less is more. Start at the end of the file using +G:

less +G some-file 

You might have to get used to pressing b (which jumps back a screen) instead of Space.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like