CompTIA Linux+ (XK0-004) — Question 95
Ann, a junior Linux administrator, needs to copy software from her local machine to assist in developing a software application on a remote machine with the IP address 192.168.3.22. The file needs to be placed on the /tmp directory. After downloading the RPM to the local machine, which of the following commands would be BEST to use to copy the software?
Answer options
- A. scp ~/software.rpm[email protected]:/tmp
- B. scp ~/software.rpm[email protected]: /tmp
- C. wget[email protected]:/tmp -f ~/software.rpm
- D. scp[email protected]~/software.rpm :/tmp
Correct answer: B
Explanation
Option B is correct because it correctly formats the scp command by specifying the correct remote user and destination path without syntax errors. Option A is incorrect due to the lack of a space before the colon, which causes a syntax error. Option C is incorrect as 'wget' is not the appropriate command for copying files over SSH, and option D contains a misplaced '@' symbol which makes it invalid.