Bird
0
0

Which of the following is the correct syntax to copy a file file.txt from your local machine to a remote server server.com under user alice in the directory /home/alice/?

easy📝 Syntax Q12 of 15
Linux CLI - SSH and Remote Access
Which of the following is the correct syntax to copy a file file.txt from your local machine to a remote server server.com under user alice in the directory /home/alice/?
Ascp file.txt alice@server.com:/home/alice/
Bscp alice@server.com:/home/alice/ file.txt
Cscp /home/alice/file.txt alice@server.com:
Dscp file.txt /home/alice/alice@server.com
Step-by-Step Solution
Solution:
  1. Step 1: Identify source and destination in scp syntax

    The syntax is scp source destination. Here, file.txt is local source, and alice@server.com:/home/alice/ is remote destination.
  2. Step 2: Check each option

    scp file.txt alice@server.com:/home/alice/ correctly places local file first and remote path second. scp alice@server.com:/home/alice/ file.txt reverses source and destination. scp /home/alice/file.txt alice@server.com: uses remote path as source incorrectly. scp file.txt /home/alice/alice@server.com has wrong path format.
  3. Final Answer:

    scp file.txt alice@server.com:/home/alice/ -> Option A
  4. Quick Check:

    scp source destination = scp file.txt alice@server.com:/home/alice/ [OK]
Quick Trick: Local file first, remote user@host:path second [OK]
Common Mistakes:
  • Swapping source and destination
  • Missing colon after remote host
  • Incorrect path order

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes