Linux - Displaying a file in reverse

March 2017




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


Published by jad05.
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).