tail

Output the last part of files. Most commonly used to monitor log files in real-time.

Synopsis

tail [options] [file]

Core Options

-f

Follow. Output appended data as the file grows.

-n num

Output the last num lines, instead of the default 10.

Usage Examples

Default Usage

Show the last 10 lines of a file.

tail error.log

Follow a Log File

Monitor a log file in real-time (Ctrl+C to exit).

tail -f /var/log/syslog

Show Last N Lines

Show the last 50 lines.

tail -n 50 app.log

Follow Multiple Files

Monitor multiple logs simultaneously.

tail -f access.log error.log
Built for builders.