tail
Output the last part of files. Useful for logs and streaming updates.
Synopsis
tail [options] [file]
Core Options
-n NShow last N lines.
-fFollow file as it grows.
-FFollow by name; retry on rotation.
-c NShow last N bytes.
--pid PIDStop following when PID exits.
Usage Examples
Follow Logs
Stream a log file.
tail -f /var/log/app.logLast 200 Lines
Inspect recent output.
tail -n 200 app.logFollow with Rotation
Handle log rotation.
tail -F /var/log/nginx/access.logBuilt for builders.