$ tail
Output the end of files
DOCUMENTEDViewing filesUbuntu 24.04 LTS baseline
Synopsis
tail [OPTION]... [FILE]...
What it does
- The default output is the last 10 lines of each file.
- `-f` follows a file as it grows and is commonly used for logs.
Examples
Show last 10 lines
tail file.logFollow a growing log
tail -f /var/log/syslogShow the last 50 lines
tail -n 50 file.logImportant details
These examples are intentionally conservative. Command behavior can still depend on filesystem state, permissions, locale, shell, installed package version, and other system configuration.
For exact option semantics, the linked authoritative documentation is the source of truth.