asked 222k views
3 votes
Which command creates a zip archive with all .txt files in the current directory?

a) zip -r archive.zip *.txt
b) create archive.zip -type txt
c) zip archive.zip -ext txt
d) compress -txt files -output archive.zip

asked
User Fabiobh
by
8.3k points

1 Answer

5 votes

Final answer:

The command 'zip -r archive.zip *.txt' is used to create a zip archive of all .txt files in the current directory.

Step-by-step explanation:

The command to create a zip archive with all .txt files in the current directory is:

zip -r archive.zip *.txt

This command uses the 'zip' utility to compress the files. The '-r' flag is used for recursive processing to include files in subdirectories (if any), but in this case, it will compress all .txt files in the current directory into an archive named 'archive.zip'. None of the other options provided is a correct syntax for creating a zip file.

answered
User Yogsma
by
8.4k points
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.