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:
Step 1: Understand partial completion behavior
Tab completes the longest common prefix among matches and adds a slash if it is a directory.
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.
Final Answer:
Because the completed part is common to multiple files and the slash indicates a directory -> Option D
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
Master "Navigating the File System" in Linux CLI
9 interactive learning modes - each teaches the same concept differently