grep: Multiple files, other input


show more grep: Multiple files, other input provides you with in-depth training on IT. Taught by Kevin Skoglund as part of the Unix for Mac OS X Users show less
please wait ...

grep: Multiple files, other input

What if we want to grep from multiple files or search inside directories? There are a couple of ways to do it. One is we could just say well, grep for Apple inside and then provide the file path, a directory in this case. So let's just say we're going to use the current path. The dot represents the current path. We could just as easily type Users/Kevin /unix_files, same thing. It comes back and says I didn't find anything. It's because we've given it a directory. If we want it to do it in this way then we need to put the -R option in front of it for recursive.

Recursively look inside here, meaning check all of the files that are in this directory and then go into the directories below that and look inside those and so on. The same option that we used with copy, move, and remove earlier. So grep recursively for apple inside this directory. So whenever we use a directory, we want to use -R just like we did when we were doing copying. So now it tells me not only the matches it...

grep: Multiple files, other input
Video duration: 4m 28s 6h 35m Beginner

Viewers:

grep: Multiple files, other input provides you with in-depth training on IT. Taught by Kevin Skoglund as part of the Unix for Mac OS X Users

Subject:
IT
Software:
Mac OS X Unix
Author:
please wait ...