tac Command Examples

Display and concatenate files with lines in reversed order. See also: cat. More information: https://www.gnu.org/software/coreutils/tac.

tac {{path/to/file1 path/to/file2 ...}}

{{cat path/to/file}} | tac

tac -s {{separator}} {{path/to/file1 path/to/file2 ...}}

tac -r -s {{separator}} {{path/to/file1 path/to/file2 ...}}

tac -b {{path/to/file1 path/to/file2 ...}}