2
Thanks

A few words of thanks would be greatly appreciated.

Linux - Displaying a File in Reverse

Users are allowed to display a particular file in reverse when they are using Linux based computer system. The command cat is used to display a file.

How To Display a File in Reverse on Linux

  • To view a file in reverse, there is simply the tac command. It is actually the CAT written in reverse:
    tac file
  • Like the command cat, you can concatenate several files, which will be put together, but in reverse:
    tac file1 file2 file3


Image: © Jaroslav Machacek - Shutterstock.com
2
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.

Related

This document, titled « Linux - Displaying a File in Reverse », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).
1 vote - 5.0/5

1 Comment


Very helpful. I realized 'sort -r' wasn't what I wanted, which was to display a log file with the
most recent entry at the top. 'tac' worked perfectly.