UNIX Basic commands: tail
The tail command displays the last ten lines of the file.
Syntax
The syntax for the tail command is:
tail [options] [file]
Options
Option | Description |
---|---|
-f | Follow the file as it grows. |
-r | Displays the lines in the reverse order. |
-n[k] | Displays the file at the nth item from the end of the file. |
+n[k] | Displays the file at the nth item from the beginning of the file. |
Example
tail -r tech
* Please note that there are many flavors of UNIX, so if in doubt, consult your man pages.
Advertisements