Bird
0
0

Why does pressing Tab sometimes complete only part of a filename and add a trailing character like a slash?

hard📝 Conceptual Q10 of 15
Linux CLI - Navigating the File System
Why does pressing Tab sometimes complete only part of a filename and add a trailing character like a slash?
ABecause Tab only completes commands, not filenames
BBecause the terminal is malfunctioning
CBecause the file is hidden
DBecause the completed part is common to multiple files and the slash indicates a directory
Step-by-Step Solution
Solution:
  1. Step 1: Understand partial completion behavior

    Tab completes the longest common prefix among matches and adds a slash if it is a directory.
  2. Step 2: Evaluate options

    Because the completed part is common to multiple files and the slash indicates a directory correctly explains partial completion and slash usage; others are incorrect.
  3. Final Answer:

    Because the completed part is common to multiple files and the slash indicates a directory -> Option D
  4. Quick Check:

    Partial completion + slash = Common prefix + directory [OK]
Quick Trick: Slash after completion means directory [OK]
Common Mistakes:
MISTAKES
  • Thinking terminal error
  • Believing Tab only completes commands
  • Assuming file is hidden

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes