Bird
0
0

Why does the command rm -r folder require caution when used in Linux?

hard📝 Conceptual Q10 of 15
Linux CLI - Linux Basics and Terminal
Why does the command rm -r folder require caution when used in Linux?
AIt creates a backup of the folder before deleting
BIt only deletes empty folders
CIt renames the folder instead of deleting
DIt recursively deletes the folder and all its contents permanently
Step-by-Step Solution
Solution:
  1. Step 1: Understand 'rm -r' command

    rm -r means remove recursively, deleting folder and all files inside.
  2. Step 2: Recognize the risk

    This deletion is permanent and cannot be undone easily, so caution is needed.
  3. Final Answer:

    It recursively deletes the folder and all its contents permanently -> Option D
  4. Quick Check:

    rm -r deletes folders and contents permanently [OK]
Quick Trick: Use rm -r carefully; it deletes everything inside folder [OK]
Common Mistakes:
  • Thinking it only deletes empty folders
  • Assuming it renames folder
  • Believing it creates backups

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes