Bird
0
0

You want to match files named data1.txt, data2.txt, but your pattern data[12].txt matches nothing. What is the likely error?

medium📝 Debug Q6 of 15
Linux CLI - File and Directory Operations
You want to match files named data1.txt, data2.txt, but your pattern data[12].txt matches nothing. What is the likely error?
AFiles are in a different directory
BPattern syntax is incorrect for matching digits
CFiles have uppercase extensions like .TXT
DSquare brackets [] do not work in globbing
Step-by-Step Solution
Solution:
  1. Step 1: Check case sensitivity in file extensions

    Globbing is case sensitive; .txt differs from .TXT.
  2. Step 2: Verify pattern and files

    If files have .TXT but pattern uses .txt, no match occurs.
  3. Final Answer:

    Files have uppercase extensions like .TXT -> Option C
  4. Quick Check:

    Globbing is case sensitive [OK]
Quick Trick: Globbing is case sensitive; match exact case [OK]
Common Mistakes:
  • Ignoring case differences
  • Assuming [] syntax is invalid
  • Not checking file location

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes