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

Study for the LPI Linux Essentials Test. Prepare with multiple choice questions, flashcards, hints, and explanations to ensure success. Get ready for your exam!

Multiple Choice

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

Explanation:
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.

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