How to search some text in a file via SSH

Let’s say we want to search for text lophost in file /var/log/messages
We can do this using command grep. Login to your server via SSH and run following command

grep lophost /var/log/messages

Our Recommended VPS Hosting

Leave us a Reply

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

* *