Using Grep To Find a Snippet of Text

2
Aug

Some developers know how to use grep well, other's don't. I'm one of the developers that only knows the basics of grep. For example: if I want to search a folder of 20+ files for a specific string it can be very tedious. However, grep makes this part of life simpler by allowing you search for a string in all files in a folder. eg. grep -lir "search string" /home/myfolder/

written by jackson

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <pre>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
  • Lines and paragraphs break automatically.
  • E-Mail addresses are hidden with reCAPTCHA Mailhide.

More information about formatting options

CAPTCHA
Complete this form and then pat yourself on the back.