Backend and Infrastructure

Using the Grep Command

Sprout Video

This video in the command line series will get you started using the very powerful grep command. This is one of the most used commands, especially if you are working with a lot of text (like code, for instance). Grep will let you search through files to find strings and it's great for tracking down where something is coming from. Grep is a very powerful tool with lots of options, but you'll see you can do a lot even with just the basics. We cover the basic command with a file, how to use it through directories, and then we use a few of the most popular options:

-r Recurse
-n Line Number
-l List
-v Reverse
-i Ignore Case

Note: this video was originally released June 22, 2010 on Lullabot.com.