Use Grep for Fast Search from the Command Line

24m 27s
English
Paid
November 1, 2023

CMD+F in your text editor can only get you so far! In this course, we will learn to use grep and find, two powerful command-line utilities, to search through and explore our codebase. Learn to search specific files and folders, using regular expressions to look for -- or ignore! -- particular phrases. We'll cover how to search recursively, get more context on your results, and some simple tricks to make your searches faster and more targeted.


More

Once you're familiar with grep and find, you'll be able to quickly answer questions such as: Do I use this function anywhere other than my tests? Where does this file get imported? Whether you're working on a new feature, reading a codebase for the first time, or refactoring existing code, grep and find can help you work faster and more effectively.

Watch Online Use Grep for Fast Search from the Command Line

Join premium to watch
Go to premium
# Title Duration
1 Search the contents of files using grep 02:16
2 Search directory contents recursively using grep 01:42
3 Use find to search for filename patterns 01:34
4 Search matching files by combining find and grep with xargs 02:21
5 Search the contents of a git repository with git grep 01:47
6 Show context around matches using grep 02:00
7 Search for basic patterns using grep 02:10
8 Use grep's extended regular expressions to find complex patterns 02:36
9 Search for optional patterns with grep OR 01:08
10 Specify line beginning and end in patterns using grep 01:19
11 Match classes of characters using bracket expressions with grep 02:22
12 Search with groups using grep 02:13
13 Find matches excluding a pattern with grep 00:59