tail

Output the last part of files. Useful for logs and streaming updates.

Synopsis

tail [options] [file]

Core Options

-n N

Show last N lines.

-f

Follow file as it grows.

-F

Follow by name; retry on rotation.

-c N

Show last N bytes.

--pid PID

Stop following when PID exits.

Usage Examples

Follow Logs

Stream a log file.

tail -f /var/log/app.log

Last 200 Lines

Inspect recent output.

tail -n 200 app.log

Follow with Rotation

Handle log rotation.

tail -F /var/log/nginx/access.log
Built for builders.