Display or follow file content.
ℹ️ Here, following means streaming a file while it's being updated (appended).
ℹ️ You can use
-c in place of
-n in the following examples, to switch to binary offset selection.
Print bottom N lines of a file
tail -n 5 ~/.bashrc
Prints last 5 lines of
Print from N-th line afterwards
tail -n +3 ~/.bashrc
~/.bashrcfrom the 3rd line until the end.
tail -f /var/log/syslog
Follows system logs (on Debian/Ubuntu).