tail¶
Output the last part of files.
Synopsis¶
Description¶
Print the last N lines of each FILE to standard output. If no files are specified, read from standard input. With the -f option, follow file changes in real-time.
Flags¶
| Flag | Short | Description | Default |
|---|---|---|---|
--lines |
-n |
Output the last N lines | 10 |
--follow |
-f |
Output appended data as file grows | false |
--quiet |
-q |
Never output headers giving file names | false |
--verbose |
-v |
Always output headers giving file names | false |
Examples¶
Show last 10 lines of a file:
Show last 20 lines:
Follow file changes (like tail -f):
Follow multiple files:
Show last lines of multiple files:
Read from stdin:
Sample Output¶
With multiple files and follow mode: