exam questions

Exam XK0-005 All Questions

View all questions & answers for the XK0-005 exam

Exam XK0-005 topic 1 question 62 discussion

Actual exam question from CompTIA's XK0-005
Question #: 62
Topic #: 1
[All XK0-005 Questions]

A Linux administrator needs to create a new cloud.cpio archive containing all the files from the current directory. Which of the following commands can help to accomplish this task?

  • A. ls | cpio -iv > cloud.epio
  • B. ls | cpio -iv < cloud.epio
  • C. ls | cpio -ov > cloud.cpio
  • D. ls cpio -ov < cloud.cpio
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
linux_admin
Highly Voted 8 months, 4 weeks ago
C. ls | cpio -ov > cloud.cpio The cpio command is used to create and extract archive files in the cpio format. The -o option is used to create an archive file, and the -v option provides verbose output during the creation process. This will pipe the output of the ls command (which lists the files in the current directory) into the cpio command, which will create a new archive file cloud.cpio containing all the listed files. The > symbol is used to redirect the output of the cpio command to the cloud.cpio file, overwriting any existing file with the same name.
upvoted 5 times
...
Ckl22
Most Recent 10 months, 2 weeks ago
C is correct, STDOUT from ls (current directory) into the -ov (create archive and display files processed by cpio) and redirecting into the filename name cloud.cpio
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago