Bird
0
0

Which command finds all files named report.txt starting from the current directory?

easy📝 Conceptual Q2 of 15
Linux CLI - Searching and Finding
Which command finds all files named report.txt starting from the current directory?
Afind . -name "report.txt"
Bfind / -name report.txt
Cfind . -type d -name report.txt
Dfind . name report.txt
Step-by-Step Solution
Solution:
  1. Step 1: Understand the find syntax for name

    The -name option requires the filename pattern in quotes to avoid shell expansion.
  2. Step 2: Choose the correct starting directory and syntax

    Starting from current directory is .. Using quotes around filename is best practice.
  3. Final Answer:

    find . -name "report.txt" -> Option A
  4. Quick Check:

    Use quotes with -name for exact filename [OK]
Quick Trick: Always quote filenames with -name to avoid shell issues [OK]
Common Mistakes:
  • Not quoting filename
  • Searching from root instead of current directory
  • Using -type d for files

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes