Bird
0
0

Given the command

medium📝 Predict Output Q5 of 15
Hadoop - Cluster Administration
Given the command
hdfs dfs -rm -r /backup/old_data, what is the expected result?
ARenames old_data directory
BDeletes the old_data directory and its contents
CCopies old_data to local backup
DDisplays contents of old_data
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command flags

    "-rm -r" removes directories recursively in HDFS.
  2. Step 2: Apply to /backup/old_data

    The command deletes the directory and all files inside it.
  3. Final Answer:

    Deletes the old_data directory and its contents -> Option B
  4. Quick Check:

    "-rm -r" means recursive delete [OK]
Quick Trick: "-rm -r" deletes directories and contents recursively [OK]
Common Mistakes:
  • Thinking it copies files
  • Assuming rename operation
  • Expecting directory listing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Hadoop Quizzes