tail flags & options
-n, --lines
Output the last N lines instead of the default 10.
tail -n 20 file.txt
tail -n +5 file.txt
-f, --follow
Output appended data as the file grows.
tail -f /var/log/syslog
tail -f -n 50 app.log
-F
Same as --follow=name --retry; follow by name and keep trying if inaccessible.
tail -F /var/log/app.log
-c, --bytes
Output the last N bytes.
tail -c 100 file.txt
tail -c +200 file.txt
--pid
With -f, terminate after the process with the given PID dies.
tail -f --pid=1234 app.log
-q, --quiet
Never output headers giving file names.
tail -q -n 5 file1.txt file2.txt