Bird
0
0

You want to copy multiple files file1.txt and file2.txt from your local machine to the remote directory /data/uploads on server example.com as user bob. Which command correctly does this in one line?

hard📝 Application Q15 of 15
Linux CLI - SSH and Remote Access
You want to copy multiple files file1.txt and file2.txt from your local machine to the remote directory /data/uploads on server example.com as user bob. Which command correctly does this in one line?
Ascp file1.txt,bob@example.com:/data/uploads/ file2.txt
Bscp file1.txt file2.txt -r bob@example.com:/data/uploads/
Cscp bob@example.com:/data/uploads/ file1.txt file2.txt
Dscp file1.txt file2.txt bob@example.com:/data/uploads/
Step-by-Step Solution
Solution:
  1. Step 1: Understand copying multiple files with scp

    scp supports copying multiple files by listing them before the destination path.
  2. Step 2: Analyze each option

    scp file1.txt file2.txt bob@example.com:/data/uploads/ correctly lists both files followed by remote destination. scp file1.txt file2.txt -r bob@example.com:/data/uploads/ misplaces the -r flag after the sources, treating "-r" as a non-existent source file. scp bob@example.com:/data/uploads/ file1.txt file2.txt reverses source and destination. scp file1.txt,bob@example.com:/data/uploads/ file2.txt has invalid syntax with comma.
  3. Final Answer:

    scp file1.txt file2.txt bob@example.com:/data/uploads/ -> Option D
  4. Quick Check:

    List files then remote destination [OK]
Quick Trick: List all files first, then remote destination [OK]
Common Mistakes:
  • Misplacing the -r flag after source files
  • Swapping source and destination
  • Incorrect file list syntax

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes