ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 200 - XK0-005 discussion

Report
Export

A Linux administrator needs to transfer a local file named accounts . pdf to a remote / tmp directory of a server with the IP address 10.10.10.80. Which of the following commands needs to be executed to transfer this file?

A.
rsync [email protected]: /tmp accounts.pdf
Answers
A.
rsync [email protected]: /tmp accounts.pdf
B.
scp accounts.pdf [email protected]:/tmp
Answers
B.
scp accounts.pdf [email protected]:/tmp
C.
cp [email protected]. 80: /tmp accounts.pdf
Answers
C.
cp [email protected]. 80: /tmp accounts.pdf
D.
ssh accounts.pdf [email protected]: /tmp
Answers
D.
ssh accounts.pdf [email protected]: /tmp
Suggested answer: B

Explanation:

The best command to use to transfer the local file accounts.pdf to the remote /tmp directory of the server with the IP address 10.10.10.80 is B. scp accounts.pdf [email protected]:/tmp. This command will use the secure copy protocol (scp) to copy the file from the local machine to the remote server over SSH. The command requires the username and password of the user on the remote server, as well as the full path of the destination directory.

The other commands are either incorrect or not suitable for this task. For example:

A) rsync [email protected]:/tmp accounts.pdf will try to use the rsync command to synchronize files between the local and remote machines, but it has the wrong syntax and order of arguments. The source should come before the destination, and a colon (:) should separate the remote host and path.

C) cp [email protected]:/tmp accounts.pdf will try to use the cp command to copy files, but it does not work over SSH and it has the wrong syntax and order of arguments. The source should come before the destination, and a colon (:) should separate the remote host and path.

D) ssh accounts.pdf [email protected]:/tmp will try to use the ssh command to log into the remote server, but it has the wrong syntax and arguments. The username should come before the remote host, and a file name is not a valid argument for ssh.

asked 02/10/2024
Leandro Zaneratto
46 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first