‫Now grep, this is a command.
‫Well, I'll tell you that grep stands for globally, search for a regular expression and then print
‫it out.
‫So that's why we say grip.
‫But the grab command basically searches a file for a particular pattern of characters.
‫And then it'll display of lines that contain that pattern.
‫The tech search pattern is called a regular expression.
‫So when it finds a match, it prints the line with a result.
‫The grep command is handy when searching through very large log files, for instance.
‫The Dash I parameters used to perform case insensitive searches.
‫You can use regular expressions with Dash E parameters.
‫Dash, our parameters can be used to read all files under each directory.
‫Recursively.
‫And then finally, the Dash V parameter, we use that when we want to select none matching lines.
‫All right, so let's give it a shot.
‫Let's go to Carly.
‫Let's read the content of the slash Etsy password file.
‫So this is a plain text file that contains a list of this system's account.
‫Giving for each account some useful information like User ID, Group, I.D., Home Directory, Shell
‫and so much more.
‫Of course, we could search for a particular pattern in this file, so let's run grep Cowley slash ETSI
‫slash police S.W.2d.
‫And here, as you can see, it, filtered the result containing Kelly.
‫So why don't we use a regular expression with the Dash E parameter?
‫So Linux regular expressions are special characters which help search data and matching complex patterns.
‫So if we had the carrot symbol to the beginning of a word, it'll display the pattern to start with
‫Callie.
‫Now, to do a case insensitive search, we can always add the Dash II parameter.
‫And will capitalize the first letter of Kelly so that we can see the result.
‫Now, as you can see, the result did not change.
‫It shows the patterns that start with Carly, regardless of upper or lower case.
‫All right, so now let's perform a recursive search.
‫So we can search for open VPN under these last user folder recursively.
‫We can also see the full path of the matched pattern.
‫Now, if you want to select non matching mines, you can just use the Dash V parameter.
‫And it shows the patterns that do not start with Kelly.