Bird
0
0

What will happen if you run this command?

medium📝 Command Output Q5 of 15
Linux CLI - SSH and Remote Access
What will happen if you run this command?
scp file.txt user@remote:/tmp/ when file.txt does not exist locally?
AThe command will copy a file named file.txt from remote to local
BThe command will create an empty file on remote
CThe command will fail with an error saying file not found
DThe command will silently skip copying
Step-by-Step Solution
Solution:
  1. Step 1: Check source file existence

    scp copies from source to destination. If source file file.txt does not exist locally, it cannot copy.
  2. Step 2: Understand error behavior

    The command will fail and show an error message indicating the source file is missing.
  3. Final Answer:

    The command will fail with an error saying file not found -> Option C
  4. Quick Check:

    Missing source file causes scp error [OK]
Quick Trick: Source file must exist locally to copy with scp [OK]
Common Mistakes:
  • Assuming remote file created empty
  • Thinking it copies remote to local
  • Expecting silent skip on error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes