Bird
0
0

You want to find all locations related to the gcc compiler including binary, source, and manual files. Which command should you use?

hard📝 Application Q15 of 15
Linux CLI - Searching and Finding
You want to find all locations related to the gcc compiler including binary, source, and manual files. Which command should you use?
Awhereis gcc
Bwhich gcc
Clocate gcc
Dfind / -name gcc
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of each command

    which shows only the executable path. locate searches a database for filenames but may show unrelated files. find searches the entire filesystem but is slow and may produce too many results.
  2. Step 2: Identify the command that shows binary, source, and manual files

    whereis is designed to show all related locations for a command including binary, source, and man pages, making it the best choice.
  3. Final Answer:

    whereis gcc -> Option A
  4. Quick Check:

    whereis = binary + source + man files [OK]
Quick Trick: Use whereis to find all related command files [OK]
Common Mistakes:
  • Using which to find all files
  • Using locate without filtering results
  • Running find without knowing its slowness

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes