🧀 Learn Linux

Advanced·Reading and processing text

tac: Output text lines in reverse order

Put in free practice

Syntax

tac [file…]

Examples

tac logs/app.log

Usage and sandbox support

Sort each file in reverse order, and the teaching input is separated by newlines.

Hands-on exercises

Full documentation ↗

Related commands