Bird
0
0

You have files named data1.csv, data2.csv, and data_final.csv. You type cat data and press Tab once. What happens?

medium📝 Command Output Q4 of 15
Linux CLI - Navigating the File System
You have files named data1.csv, data2.csv, and data_final.csv. You type cat data and press Tab once. What happens?
AThe terminal shows all matching files starting with 'data'
BThe command auto-completes to <code>cat data</code> with no change
CThe command auto-completes to <code>cat data1.csv</code>
DThe terminal clears the screen
Step-by-Step Solution
Solution:
  1. Step 1: Understand tab completion with multiple matches

    If multiple files match the prefix, pressing Tab once usually lists all matches.
  2. Step 2: Analyze the given files and input

    Files starting with 'data' are multiple, so the terminal lists them instead of completing.
  3. Final Answer:

    The terminal shows all matching files starting with 'data' -> Option A
  4. Quick Check:

    Multiple matches + Tab = List matches [OK]
Quick Trick: One Tab lists matches if multiple completions exist [OK]
Common Mistakes:
  • Expecting auto-complete to one file
  • Thinking screen clears
  • No change on first Tab

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes