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 Top Rated Host

Related Posts