Bird
0
0

Which of the following is the correct syntax to find all files named notes.txt in the current directory and its subdirectories?

easy📝 Syntax Q12 of 15
Linux CLI - Searching and Finding
Which of the following is the correct syntax to find all files named notes.txt in the current directory and its subdirectories?
Afind . -name notes.txt
Bfind -name notes.txt .
Cfind notes.txt -name .
Dfind . notes.txt -name
Step-by-Step Solution
Solution:
  1. Step 1: Recall find command syntax

    The correct syntax is: find [path] [options]. Here, '.' means current directory, '-name' specifies the filename.
  2. Step 2: Check each option

    find . -name notes.txt matches the correct syntax. Options A, B, and D have misplaced arguments or options.
  3. Final Answer:

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

    find . -name filename [OK]
Quick Trick: Path first, then options like -name [OK]
Common Mistakes:
  • Putting filename before path
  • Missing dot for current directory
  • Wrong order of options and arguments

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes