If you are using Linux then you can rest assured that you are using one of the safest servers in the world. But even though it is one of the safest, that does not mean an attack cannot happen. Attacks happen on Linux servers all of the time and it is something that you must be ready to stop. You must be able to defend your home front and luckily Linux gives us the tools to do just that. One of the tools is an old school UNIX application that goes by the name of Grep.
What is Grep?
Some of you, even if you use Linux servers might be asking what exactly is Grep. It is a tool that you should know early on if you are using a Linux server but still not a lot of people do. Grep is a tool that stands for Global Regular Expression Print. If you know anything about regular expressions then you know that they will allow you to place a certain set of keywords inside of them and will look for those keywords in your system. And that is what Grep does. It searches for anything that is text in your system that you type the keyword for.
And that is how it may help you when it comes to the securing of your Linux based server. When there is an attack on your system, there are certain logs created or certain files that are changed. When you know what you are looking for, you can automate the Grep tool to look for these changes. For each type of attack, what you are looking for will change but there will be some sort of clue on the computer. No black hat hacker can just get in there and leave no single trace at all. If you know your system well enough, you will be able to automate Grep to look for those traces.
Grep is a great tool to use and not just for security purposes.