How to exit from Tail command in SSH

Tail is a very useful SSH command to read a file. Its like cat command but it only reads a file. Tail command by default will show last 20 lines of a file.

Example

tail /var/log/messages

This will show the last 20 lines of /var/log/messages

tail -f /var/log/messages

This will show last 20 lines of /var/log/messages and will also update while it’s being changed / updated.

tail -100 /var/log/messages

This will show the last 100 lines of /var/log/messages

How to exit from tail command

Simply press following key on your keyboard.

ctrl + c

Our Recommended Dedicated Server

Leave us a Reply

Your email address will not be published. Required fields are marked *

* *