tail
Output the last part of files
Overview
Prints the last 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name.
Syntax
tail [OPTION]... [FILE]...Common Options
-n, --lines=[+]KOutput the last K lines, instead of the last 10; or use -n +K to output lines starting with the Kth.
-c, --bytes=[+]KOutput the last K bytes; or use -c +K to output bytes starting with the Kth of each file. (K may have a multiplier like head).
-f, --follow[={name|descriptor}]Output appended data as the file grows.
-FSame as --follow=name --retry. Useful if the file may be rotated or renamed.
-q, --quiet, --silentNever output headers giving file names.
-v, --verboseAlways output headers giving file names.
--pid=PIDWith -f, terminate after process ID, PID, dies.
Examples
Displays the last 10 lines of myfile.txt.
Displays the last 20 lines of error.log.
Displays all lines of data.csv starting from the 5th line.
Displays the last 50 bytes of access.log.
Continuously monitors /var/log/syslog for new lines (useful for live log viewing).
Shows the last 20 kernel messages.