Bird
0
0

You ran ls hR but got an error: "ls: cannot access 'hR': No such file or directory". What is the likely cause?

medium📝 Debug Q14 of 15
Linux CLI - Navigating the File System
You ran ls hR but got an error: "ls: cannot access 'hR': No such file or directory". What is the likely cause?
AOptions must be combined without spaces
BYou typed options together without a dash
COptions order is incorrect
DYou used uppercase letters instead of lowercase
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the error message

    The error "ls: cannot access 'hR': No such file or directory" suggests the shell interpreted 'hR' as a file or directory name.
  2. Step 2: Identify correct option syntax

    Options must be preceded by a dash and can be combined like -hR. Typing ls hR without dash causes the shell to treat 'hR' as a filename.
  3. Final Answer:

    You typed options together without a dash -> Option B
  4. Quick Check:

    Options need dash prefix [OK]
Quick Trick: Always prefix options with a dash (-) [OK]
Common Mistakes:
  • Using uppercase instead of lowercase options
  • Putting spaces between dash and options
  • Assuming option order matters

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes