alwbtc alwbtc - 2 years ago 115
Linux Question

How to find lines containing a string in linux

I have a file in Linux, I would like to diplay lines which contain a specific string in that file, how to do this?

Answer Source

The usual way to do this is with grep

grep 'pattern' file
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download