Linux - Displaying a file in reverse

December 2016

The command "cat" is used to display a file (or to concatenate several).
  • To view a file in reverse (starting with the last line until the first), there is simply the "tac" (cat 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 

Related :

This document entitled « Linux - Displaying a file in reverse » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.