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.
Use Grep for Fast Search from the Command Line
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.
About the Author: egghead.io
egghead.io is a US-based subscription video platform focused on short, focused screencasts on JavaScript ecosystem topics. Founded in 2012 by John Lindquist (a Google Developer Expert) and run by Joel Hooks, egghead pioneered the short-screencast format that most modern developer-education platforms now use — courses are typically broken into 2-5 minute lessons that each cover one specific concept or API.
The instructor roster includes many of the most cited names in the JavaScript ecosystem — Kent C. Dodds (whose Testing JavaScript launched on egghead before EpicWeb.dev), Andrew Del Prete, Hannah Davis, Lukas Ruebbelke, Tomasz Łakomy, Andy Van Slaars, and many others. Course material covers React, Next.js, TypeScript, Node.js, GraphQL, Vue, the testing tracks, RxJS / observables, and a long list of smaller libraries and tools.
The CourseFlix listing under this source carries over 20 egghead courses spanning that range. Material is paid; egghead itself runs on a monthly / annual subscription on the original platform. The bite-sized format suits developers learning incrementally during work hours rather than committing to multi-hour video sessions.
Watch Online 13 lessons
| # | Lesson Title | Duration | Access |
|---|---|---|---|
| 1 | Search the contents of files using grep Demo | 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 |
Get instant access to all 12 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.
Learn more about subscriptionCourse content
13 lessons · 24m 27sShow all 13 lessons
- 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