Learn · Claude Code fundamentals · CCAR-F task 2.5
Built-in tools
Glob finds files, Grep finds usages, Read reads them, Edit changes them: pick the dedicated tool, and keep Bash for what has none.
Key ideas
- Glob finds files by name pattern (e.g. **/*.test.ts); it returns paths, not contents.
- Grep searches file contents by regex to find where something is used.
- Read only the files Grep or Glob located, instead of reading everything.
- Edit makes an exact string replacement: prefer it over Write for changing existing files.
- Write creates or fully overwrites a file: use it for new files.
- Bash is for tests, git and builds, where no dedicated tool exists; permission rules control it.
Worked example: Find and fix a function's callers
Asked to update every caller of calculateTax, a well-behaved session uses Grep to locate the three call sites, Reads just those files, and makes one Edit per change, then runs the tests with Bash. No cat, find or full-file rewrites.
Exam traps
- Running cat, grep or find through Bash when Read, Grep and Glob exist.
- Using Write to change one function: it rewrites the whole file and risks losing content.
- Reading every file in a module to understand it instead of searching first.
- Confusing Glob (file names) with Grep (file contents).
Official docs
Practise CCAR-F questions · Next lesson: Commands and checkpoints