tail <file>Prints the last 10 lines.
Example
tail /var/log/syslogPrints the last lines of files and follows them as they grow — the standard way to watch logs.
sudo apt install coreutilstail <file>Prints the last 10 lines.
Example
tail /var/log/syslogtail -n <n> <file>Prints the last n lines.
Example
tail -n 50 error.logtail -n +<n> <file>Prints from line n onward — here, everything after a CSV header.
Example
tail -n +2 data.csvtail -c <bytes> <file>Prints the last n bytes.
Example
tail -c 200 output.bintail -f <file>Follows a file as new lines are written. Ctrl-C to stop.
Example
tail -f /var/log/nginx/access.logtail -F <file>Follows by name and reopens the file when it is rotated — use this for long-running watches.
Example
tail -F /var/log/auth.logtail -f <file1> <file2>Follows several files at once with headers.
Example
tail -f access.log error.logtail -f <file> | grep --line-buffered <pattern>Watches only for matching lines, such as failed SSH logins, as they happen.
Example
tail -f /var/log/auth.log | grep --line-buffered "Failed password"tail -f --pid=<pid> <file>Stops following when the given process exits.
Example
tail -f --pid=4120 build.logPrints the first lines or bytes of files — quick previews of logs and data.
A pager for viewing large files and command output one screen at a time, with search and follow mode.
Queries the systemd journal: logs by service, boot, time range, priority and more.
Concatenates files and prints them to standard output — view, combine and create files.
The shell built-in that lists, searches and re-runs previous commands, and manages the history file.
Runs a command repeatedly and shows its output full-screen, highlighting what changes between runs.