演習 › 全問
問題 Q2-17
51 / 120分野2・組み込みツールの使い分け
まだ解いていません。
大規模なコードベースで、関数 calculateTax を呼んでいる箇所をすべて見つけたい。最も適切な道具はどれか。
正解は A
- A正解です。ファイルの中身から文字列を探すのは Grep の役割です。呼び出し元を洗い出せます。
- BGlob は、ファイル名のパターンで探します。中身の文字列は探せません。
- C全ファイルを読むのは、非効率で、文脈も圧迫します。
- DWrite はファイルを書く道具で、検索ではありません。
考え方:中身の文字列を探すのは Grep。名前のパターンで探すのは Glob。
出典:Tools reference
Where Glob finds files by name, Grep finds lines inside them.https://code.claude.com/docs/en/tools-reference.md(取得 2026-11-20)
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Building codebase understanding incrementally: starting with Grep to find entry points, then using Read to follow imports and trace flows, rather than reading all files upfronthttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)