nerdexam
CompTIA

XK0-005 · Question #1543

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?

The correct answer is C. ls | cpio -ov > cloud.cpio. 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…

System Management

Question

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?

Options

  • Als | cpio -iv > cloud.epio
  • Bls | cpio -iv < cloud.epio
  • Cls | cpio -ov > cloud.cpio
  • Dls cpio -ov < cloud.cpio

How the community answered

(21 responses)
  • B
    10% (2)
  • C
    86% (18)
  • D
    5% (1)

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.

Topics

#Linux commands#File archiving#cpio utility#Piping and Redirection

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice