Which command creates a ZIP archive poems.zip containing all files ending in .txt?

Prepare for the LPI Linux Essentials 010-160 Test. Study with flashcards and multiple choice questions, each question offers hints and explanations. Get ready to ace your exam!

The command that creates a ZIP archive named poems.zip containing all files that end with .txt is constructed as follows: zip poems.zip *.txt.

In this command, "zip" is the utility used to create ZIP archives. The first argument, "poems.zip," specifies the name of the archive file to be created. The "*.txt" pattern matches all files in the current directory that have a .txt extension, meaning all text files will be included in the archive. This approach efficiently gathers all the specified files and compresses them into a single ZIP file that can be easily managed and transferred.

This command does not involve any recursive functionality, as the files are directly taken from the current directory. As a result, it is straightforward and effective for creating an archive of the specified file type.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy