Bird
0
0

What will be the output of this command if the source file does not exist?

medium📝 Predict Output Q13 of 15
Hadoop - Cluster Administration
What will be the output of this command if the source file does not exist?
hdfs dfs -cp /data/file1.txt /backup/file1.txt
Acp: `/data/file1.txt`: No such file or directory
BFile copied successfully
CBackup created with empty file
DCommand runs silently without error
Step-by-Step Solution
Solution:
  1. Step 1: Understand the cp command behavior

    The hdfs dfs -cp command copies files within HDFS. If the source file does not exist, it throws an error.
  2. Step 2: Match error message

    The error message for missing source file is "No such file or directory" as in cp: `/data/file1.txt`: No such file or directory.
  3. Final Answer:

    cp: `/data/file1.txt`: No such file or directory -> Option A
  4. Quick Check:

    Missing source file = error message [OK]
Quick Trick: Missing source file causes 'No such file' error [OK]
Common Mistakes:
  • Assuming silent success
  • Expecting empty file creation
  • Confusing error with copy success

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Hadoop Quizzes