nerdexam
CompTIA

XK0-005 · Question #8

A Linux systems administrator needs to copy the contents of a directory named "working" on the local working system to a folder /var/www/html on a server named "corporate-web". Which of the…

The correct answer is A. scp -r working/* webuser@corporate-web:/var/www/html. The command 'scp -r working/* webuser@corporate-web:/var/www/html' is correct. 'scp' (Secure Copy Protocol) uses SSH to securely transfer files over the network. The '-r' flag enables recursive copying of all files and subdirectories within the 'working' directory. The syntax…

System Management

Question

A Linux systems administrator needs to copy the contents of a directory named "working" on the local working system to a folder /var/www/html on a server named "corporate-web". Which of the following commands will allow the administrator to copy all the contents to the web server?

Options

  • Ascp -r working/* webuser@corporate-web:/var/www/html
  • Btar working/* webuser@corporate-web:/var/www/html
  • Ccp -r working/* webuser@corporate-web:/var/www/html
  • Dmv working webuser@corporate-web:/var/www/html

How the community answered

(66 responses)
  • A
    89% (59)
  • B
    6% (4)
  • C
    2% (1)
  • D
    3% (2)

Explanation

The command 'scp -r working/* webuser@corporate-web:/var/www/html' is correct. 'scp' (Secure Copy Protocol) uses SSH to securely transfer files over the network. The '-r' flag enables recursive copying of all files and subdirectories within the 'working' directory. The syntax 'user@host:/path' specifies the remote destination. Option B ('tar') is an archive tool that does not natively support remote transfer in this syntax. Option C ('cp') only works locally - it cannot copy to a remote host using the user@host syntax. Option D ('mv') also operates locally only and would remove the source directory rather than copy it.

Topics

#scp#Remote File Transfer#Linux Commands#File Management

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice