Bird
0
0

What does the command rm -r foldername do in Linux?

easy📝 Conceptual Q11 of 15
Linux CLI - File and Directory Operations
What does the command rm -r foldername do in Linux?
AMoves the folder named 'foldername' to the trash bin.
BDeletes the folder named 'foldername' and all its contents recursively.
CRenames the folder named 'foldername' to 'r'.
DCreates a new folder named 'foldername'.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the rm command

    The rm command is used to remove files or directories in Linux.
  2. Step 2: Understand the -r option

    The -r option means recursive, so it deletes the folder and everything inside it.
  3. Final Answer:

    Deletes the folder named 'foldername' and all its contents recursively. -> Option B
  4. Quick Check:

    rm -r deletes folders recursively = C [OK]
Quick Trick: Remember: rm -r removes folders and all inside them [OK]
Common Mistakes:
MISTAKES
  • Thinking rm -r moves files to trash
  • Confusing rm -r with renaming
  • Assuming rm -r only deletes empty folders

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes