Bird
0
0

If you run ls -lR in a directory with two subdirectories each containing files, what will the output show?

medium📝 Command Output Q4 of 15
Linux CLI - Navigating the File System
If you run ls -lR in a directory with two subdirectories each containing files, what will the output show?
AOnly files in the current directory with detailed info, ignoring subdirectories
BDetailed listing of all files in the current directory and recursively in each subdirectory
CA summary count of files in each subdirectory without details
DOnly the names of subdirectories without listing their contents
Step-by-Step Solution
Solution:
  1. Step 1: Understand -l and -R options

    -l shows detailed info; -R lists directories recursively.
  2. Step 2: Predict output

    The command lists all files with details in the current directory and then recursively in each subdirectory.
  3. Final Answer:

    Detailed listing of all files in the current directory and recursively in each subdirectory -> Option B
  4. Quick Check:

    -l for details + -R for recursion [OK]
Quick Trick: Combine -l for details and -R for recursion [OK]
Common Mistakes:
MISTAKES
  • Assuming -R only lists directory names
  • Thinking -lR lists only current directory
  • Confusing recursive listing with summary

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes