ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 11 - XK0-005 discussion

Report
Export

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
Answers
A.
ls | cpio -iv > cloud.epio
B.
ls | cpio -iv < cloud.epio
Answers
B.
ls | cpio -iv < cloud.epio
C.
ls | cpio -ov > cloud.cpio
Answers
C.
ls | cpio -ov > cloud.cpio
D.
ls cpio -ov < cloud.cpio
Answers
D.
ls cpio -ov < cloud.cpio
Suggested answer: C

Explanation:

The command ls | cpio -ov > cloud.cpio can help to create a new cloud.cpio archive containing all the files from the current directory. The ls command lists the files in the current directory and outputs them to the standard output. The | operator pipes the output to the next command.

The cpio command is a tool for creating and extracting compressed archives. The -o option creates a new archive and the -v option shows the verbose output. The > operator redirects the output to the cloud.cpio file. This command will create a new cloud.cpio archive with all the files from the current directory. The other options are incorrect because they either use the wrong options (-i instead of -o), the wrong arguments (cloud.epio instead of cloud.cpio), or the wrong syntax (< instead of > or missing |). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 11: Managing Files and Directories, page 351.

asked 02/10/2024
Avion Bryant
46 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first