Bird
0
0

A user runs ls -l -a -R but only sees files in the current directory. What might be wrong?

medium📝 Debug Q7 of 15
Linux CLI - Navigating the File System
A user runs ls -l -a -R but only sees files in the current directory. What might be wrong?
AThe command syntax is incorrect; options must be combined
BThe user forgot to add -h for human-readable sizes
CThe directory has no subdirectories to list recursively
DThe user lacks permission to list subdirectories
Step-by-Step Solution
Solution:
  1. Step 1: Understand -R option

    -R lists files recursively in subdirectories if they exist.
  2. Step 2: Check why no recursive listing

    If no subdirectories exist, recursive listing shows only current directory files.
  3. Final Answer:

    The directory has no subdirectories to list recursively -> Option C
  4. Quick Check:

    ls -R shows subdirs only if present [OK]
Quick Trick: No subdirectories means no recursive output [OK]
Common Mistakes:
  • Thinking options must be combined
  • Assuming -h is required
  • Ignoring directory structure

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes