How To Use grep Command In Linux

The grep command searches the given file for lines containing a match to the given strings or words. By default, grep prints the matching lines. grep can be used to search for lines of text that match one or many regular expressions, and outputs only the matching lines. grep Syntax grep ‘word’ filenamegrep ‘string1 string2’ […]

Detecting listening network ports on Linux

It is importand to check for ports that are open and there are not needed. For a list of network ports that are open you can use the following commands: netstat -tulp orlsof -i -n | egrep ‘COMMAND|LISTEN|UDP’ Or, you are not limited to netstat or lsof but you can always use a port scanner, […]