tail

tail - output the last part of files


Display the last 10 lines of a file:

tail /var/log/messages

Display the last 20 lines of a file:

tail -n 20 /var/log/messages

Display the last lines of a file in real-time:

tail -f /var/log/messages

Display the last 30 bytes of a file:

tail -c 30 /var/log/messages

Display the last 10 lines of a file with the filename:

tail -nv 10 /var/log/messages

Display tail command help:

tail --help

Display tail command version:

tail --version